[ Term I/O | Reference Manual | Alphabetic Index ]
The term Term is written on the output stream Stream according to the
current operator declarations. Equivalent to write(Stream,Term),
- Stream handle or alias (atom)
- Prolog term.
Used to write the term Term (followed by a newline) on the output stream
Stream according to the current operator declarations.
Modes and Determinism
This predicate is sensitive to its module context (tool predicate, see @/2).
- (4) instantiation fault
- Stream is not instantiated.
- (5) type error
- Stream is not an atom or a stream handle.
- (192) illegal stream mode
- Stream is not an output stream.
- (193) illegal stream specification
- Stream is an illegal stream specification.
?- open(file1,update,s), writeln(s, X + 2),
writeln(s, Y + 3), close(s).
X = _90
Y = _78
?- sh('cat file1').
_90 + 2
_78 + 3
writeln(S, a(b,c)). (Error 4).
writeln("string", a(b,c)). (Error 5).
writeln(9, X + 2). (Error 192).
writeln(atom, X + 2). (Error 193).
writeln / 1, write / 1, write / 2