next up previous contents index
Next: 6.1.5 Term I/O Up: 6.1 Input and Output Previous: 6.1.3 DEC-IO Style File   Contents   Index

6.1.4 Character I/O

nl
ISO
A new line character is sent to the current output stream.

nl(+Stream)
ISO
A new line character is sent to the designated output stream.

Error Cases

get_char(+Stream_or_alias,?Char)
ISO
Unifies Char with the next ASCII character from Stream_or_alias, advancing the position of the stream. Char is unified with -1 if an end of file condition is detected.

Error Cases

get_char(?Char)
ISO
Behaves as get_char/2, but reads from the current input stream.

Error Cases

get_code(+Stream_or_alias,?Code)
ISO
Code unifies with the ASCII code of the next character from Stream_or_alias. The position of the stream is advanced.

Error Cases

get_code(?Code)
ISO
Behaves as get_code/2, but reads from the current input stream.

Error Cases

get0(?N)

N is the ASCII code of the next character read from the current input stream (regarded as a text stream). If the current input stream reaches its end of file, a -1 is returned. This predicate does not check for errors, so that it is faster (and less safe) than, e.g. get_code/1.

get(?N)

N is the ASCII code of the next non-blank printable character from the current input stream (regarded as a text stream). If the current input stream reaches its end of file, a -1 is returned.

peek_char(+Stream_or_alias,?Char)
ISO
Char is the next ASCII character from Stream_or_alias. The position in Stream_or_alias is unchanged. Char is unified with -1 if an end of file condition is detected.

Error Cases

peek_char(?Char)
ISO
Char is the next ASCII character from the current input stream. The position in the current input stream is unchanged. Char is unified with -1 if an end of file condition is detected.

Error Cases

peek_code(+Stream_or_alias,?Code)
ISO
Code is the next ASCII coder from Stream_or_alias. The position in Stream_or_alias is unchanged. Code is unified with -1 if an end of file condition is detected.

Error Cases

peek_code(?Code)
ISO
Behaves as peek_code/1, but the current input stream is used.

Error Cases

put_char(+Stream,+Char)
ISO
Puts the ASCII character Char to Stream_or_alias.

Error Cases

put_char(+Char)
ISO
Puts the ASCII code of the character Char to the current output stream.

Error Cases

put_code(+Stream,+Code)
ISO
Puts the ASCII code of the character Char to Stream_or_alias.

Error Cases

put_code(+Code)
ISO
Puts the ASCII code Code to the current output stream. Error Cases

put(+Code)

Puts the ASCII character code N to the current output stream.

Error Cases

tab(+N)

Puts N spaces to the current output stream.

Error Cases


next up previous contents index
Next: 6.1.5 Term I/O Up: 6.1 Input and Output Previous: 6.1.3 DEC-IO Style File   Contents   Index
Terrance Swift 2007-10-05