Input loop: Difference between revisions
Content added Content deleted
m (Commodore BASIC: Swapped the last semicolon for a colon in line 15. [Doh!]) |
(Added solution for Action!) |
||
Line 177: | Line 177: | ||
.include "../includeARM64.inc" |
.include "../includeARM64.inc" |
||
</lang> |
</lang> |
||
=={{header|Action!}}== |
|||
<lang Action!>PROC ReadStream(BYTE stream) |
|||
CHAR ARRAY line(255) |
|||
WHILE Eof(stream)=0 |
|||
DO |
|||
InputSD(stream,line) |
|||
PrintE(line) |
|||
OD |
|||
RETURN |
|||
PROC Main() |
|||
BYTE streamId=[1] |
|||
Close(streamId) |
|||
Open(streamId,"H6:INPUT_PU.ACT",4) |
|||
PrintE("Reading from stream...") PutE() |
|||
ReadStream(streamId) |
|||
Close(streamId) |
|||
RETURN</lang> |
|||
{{out}} |
|||
[https://gitlab.com/amarok8bit/action-rosetta-code/-/raw/master/images/Input_loop.png Screenshot from Atari 8-bit computer] |
|||
<pre> |
|||
Reading from stream... |
|||
PROC ReadStream(BYTE stream) |
|||
CHAR ARRAY line(255) |
|||
WHILE Eof(stream)=0 |
|||
DO |
|||
InputSD(stream,line) |
|||
PrintE(line) |
|||
OD |
|||
RETURN |
|||
PROC Main() |
|||
BYTE streamId=[1] |
|||
Close(streamId) |
|||
Open(streamId,"H6:INPUT_PU.ACT",4) |
|||
PrintE("Reading from stream...") PutE() |
|||
ReadStream(streamId) |
|||
Close(streamId) |
|||
RETURN |
|||
</pre> |
|||
=={{header|Ada}}== |
=={{header|Ada}}== |