corrected BREAK example
[rrq/rrqforth.git] / adoc / p_read_stream_char.adoc
1 // stdio.asm:   WORD p_read_stream_char,'READ-STREAM-CHAR',fasm
2
3 anchor:p_read_stream_char[]
4
5 === Word: READ-STREAM-CHAR
6
7 ....
8 Data stack: ( stream -- c )
9 ....
10
11 "READ-STREAM-CHAR" is a function word that gets the next character
12 from the given stream buffer, possibly refilling the buffer if it is
13 backed by a file descriptor. The refill is done by a SYS_READ call
14 when more characters are needed. The next character is pushed on the
15 stack, unless the stream is exhausted in which case the -1 is pushed
16 instead.
17
18 See also <<p_stream,STREAM>>.