[ Term I/O | Reference Manual | Alphabetic Index ]
Read term with type and source position information
- Stream handle or alias (atom)
- Variable or term
This is defined as
read_annoated(Stream, AnnTerm) :-
read_annotated(Stream _Term, AnnTerm).
Modes and Determinism
- read_annotated(+, -) is semidet
This predicate is sensitive to its module context (tool predicate, see @/2).
Fails if a syntax error was detected and no term could be read
- (4) instantiation fault
- Stream is not instantiated.
- (5) type error
- Stream is not an atom or a stream handle.
- (190) end of file reached
- End of file was encountered before reading any character.
- (192) illegal stream mode
- Stream is not an input stream.
- (193) illegal stream specification
- Stream is an illegal stream specification.
- (198) reading past the file end
- Trying to read even after the error 190 was raised.
read_annotated / 3