Copy stdin to stdout: Difference between revisions

m
→‎{{header|Phix}}: added syntax colouring the hard way, phix/basics
m (→‎{{header|Phix}}: added syntax colouring the hard way, phix/basics)
Line 414:
 
=={{header|Phix}}==
{{libheader|Phix/basics}}
<lang Phix>while true do
<!--<lang Phix>-->
integer ch = wait_key()
<span style="color: #008080;">while</span> <span style="color: #004600;">true</span> <span style="color: #008080;">do</span>
if ch=#1B then exit end if
<span style="color: #004080;">integer</span> <span style="color: #000000;">ch</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">wait_key<span style="color: #0000FF;">(<span style="color: #0000FF;">)</span> <span style="color: #000080;font-style:italic;">-- or getc(0)</span>
puts(1,ch)
<span style="color: #008080;">if</span> <span style="color: #000000;">ch<span style="color: #0000FF;">=<span style="color: #000000;">#1B</span> <span style="color: #008080;">then</span> <span style="color: #008080;">exit</span> <span style="color: #008080;">end</span> <span style="color: #008080;">if</span> <span style="color: #000080;font-style:italic;">-- escape</span>
end while</lang>
<span style="color: #7060A8;">puts<span style="color: #0000FF;">(<span style="color: #000000;">1<span style="color: #0000FF;">,<span style="color: #000000;">ch<span style="color: #0000FF;">)</span>
<span style="color: #008080;">end</span> <span style="color: #008080;">while
<!--</lang>-->
 
=={{header|PicoLisp}}==
7,805

edits