[ Character I/O | The ECLiPSe Built-In Predicates | Reference Manual | Alphabetic Index ]
tyi(?Ascii)
Succeeds if the ascii code of the next character read in raw mode from the
current input is successfully unified with Ascii.
- ?Ascii
- Integer.
Description
Takes the next character from the current input and unifies its integer
ASCII code (in the range 0 to 255) with Ascii. The input is in raw mode
so that no newline character must be typed.
ASCII codes for the non-printable characters (i.e. control characters)
are also acceptable.
Fail Conditions
Fails if Ascii does not unify with the next character from the current
input.
Resatisfiable
No.
Exceptions
- (5) type error
- Ascii is instantiated, but not to an integer.
- (190) end of file reached
- End of file was encountered before reading any character.
- (198) reading past the file end
- Trying to read even after the error 190 was raised.
Examples
Equivalent to tyi(input, Ascii). (see tyi/2 for details).
See Also
tyi / 2, tyo / 1, tyo / 2