Copy a string: Difference between revisions
m
→{{header|Phix}}: added syntax colouring the hard way, phix/basics
Drkameleon (talk | contribs) (added Arturo) |
m (→{{header|Phix}}: added syntax colouring the hard way, phix/basics) |
||
Line 1,709:
=={{header|Phix}}==
{{libheader|Phix/basics}}
Use of strings is utterly intuitive with no unexpected side effects. For example
<!--<lang Phix>
<span style="color: #004080;">string</span> <span style="color: #000000;">one</span> <span style="color: #0000FF;">=</span> <span style="color: #008000;">"feed"</span>
<span style="color: #004080;">string</span> <span style="color: #000000;">two</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">one</span> <span style="color: #000080;font-style:italic;">-- (two becomes "feed", one remains "feed")</span>
<span style="color: #000000;">two<span style="color: #0000FF;">[<span style="color: #000000;">2<span style="color: #0000FF;">..<span style="color: #000000;">3<span style="color: #0000FF;">]</span> <span style="color: #0000FF;">=</span> <span style="color: #008000;">"oo"</span> <span style="color: #000080;font-style:italic;">-- (two becomes "food", one remains "feed")</span>
<span style="color: #000000;">one<span style="color: #0000FF;">[<span style="color: #000000;">1<span style="color: #0000FF;">]</span> <span style="color: #0000FF;">=</span> <span style="color: #008000;">'n'</span> <span style="color: #000080;font-style:italic;">-- (two remains "food", one becomes "need")</span>
<span style="color: #0000FF;">?<span style="color: #0000FF;">{<span style="color: #000000;">one<span style="color: #0000FF;">,<span style="color: #000000;">two<span style="color: #0000FF;">}
<!--</lang>-->
{{out}}
<pre>
|