
writeln(+Stream, ?Term)

   The term Term is written on the output stream Stream according to the
current operator declarations.  Equivalent to write(Stream,Term),
nl(Stream).



Arguments
   Stream              Integer (stream number) or Atom (reserved or user-defined                symbolic stream name).
   Term                Prolog term.

Type
   Term I/O

Description
   Used to write the term Term (followed by a newline) on the output stream
   Stream according to the current operator declarations.




Modes and Determinism
   writeln(+, ?) is det

Modules
   This predicate is sensitive to its module context (tool predicate, see @/2).

Exceptions
     4 --- Stream is not instantiated.
     5 --- Stream is not an atom or an integer.
   192 --- Stream is not an output stream.
   193 --- Stream is an illegal stream specification.

Examples
   
   Success:
      [eclipse]: open(file1,update,s), writeln(s, X + 2),
      > writeln(s, Y + 3), close(s).
      X = _90
      Y = _78
      yes.
      [eclipse]: sh('cat file1').
      _90 + 2
      _78 + 3
      yes.

Error:
      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).





See Also
   writeln / 1, write / 1, write / 2
