Copy stdin to stdout: Difference between revisions
Content deleted Content added
m →{{header|Phix}}: added syntax colouring the hard way, phix/basics |
m Whoops, duplicated Symsyn section |
||
Line 414: | Line 414: | ||
=={{header|Phix}}== |
=={{header|Phix}}== |
||
<lang Phix>while true do |
|||
{{libheader|Phix/basics}} |
|||
integer ch = wait_key() |
|||
<!--<lang Phix>--> |
|||
if ch=#1B then exit end if |
|||
<span style="color: #008080;">while</span> <span style="color: #004600;">true</span> <span style="color: #008080;">do</span> |
|||
puts(1,ch) |
|||
<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> |
|||
⚫ | |||
<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> |
|||
<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}}== |
=={{header|PicoLisp}}== |
||
Line 570: | Line 567: | ||
chan copy stdin stdout |
chan copy stdin stdout |
||
# fcopy stdin stdout for older versions</lang> |
# fcopy stdin stdout for older versions</lang> |
||
=={{header|Symsyn}}== |
|||
<lang Symsyn> |
|||
Loop [] [] |
|||
go Loop |
|||
⚫ | |||
=={{header|Wren}}== |
=={{header|Wren}}== |