[ Character I/O | Reference Manual | Alphabetic Index ]
Reads the next character or byte from the current input stream
- Variable or integer.
Takes the next character from the current input stream, and unifies its
integer character code with Code. The range of possible values depends
on the stream's text encoding, or is 0 to 255 for binary streams.
Character codes for the non-printable characters (i.e. control characters)
are treated like normal characters.
On end-of-file, -1 is returned (via the default handler for event 190).
Modes and Determinism
- (5) type error
- Code is instantiated, but not to an integer.
- (190) end of file reached
- End of file has been reached.
Equivalent to get(input, Code). (see get/2 for details).
get / 2, put / 1, put / 2