1/*  Part of Ciao Prolog compatibility library
    2
    3    Author:        Jan Wielemaker
    4    E-mail:        J.Wielemaker@uva.nl
    5    WWW:           http://www.swi-prolog.org
    6    Copyright (C): 2010, University of Amsterdam
    7
    8    This program is free software; you can redistribute it and/or
    9    modify it under the terms of the GNU General Public License
   10    as published by the Free Software Foundation; either version 2
   11    of the License, or (at your option) any later version.
   12
   13    This program is distributed in the hope that it will be useful,
   14    but WITHOUT ANY WARRANTY; without even the implied warranty of
   15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   16    GNU General Public License for more details.
   17
   18    You should have received a copy of the GNU General Public
   19    License along with this library; if not, write to the Free Software
   20    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
   21
   22    As a special exception, if you link this library with other files,
   23    compiled with a Free Software compiler, to produce an executable, this
   24    library does not by itself cause the resulting executable to be covered
   25    by the GNU General Public License. This exception does not however
   26    invalidate any other reasons why the executable file might be covered by
   27    the GNU General Public License.
   28*/
   29
   30:- module(write,
   31	  [ write_term/3,
   32	    write_term/2,
   33%	    write_option/1,		(type)
   34	    write/2, write/1,
   35	    writeq/2, writeq/1,
   36	    write_canonical/2, write_canonical/1,
   37	    print/2, print/1, write_list1/1,
   38	    portray_clause/2, portray_clause/1,
   39	    numbervars/3, prettyvars/1,
   40	    printable_char/1
   41        ]).   42
   43:- use_module(swi(library/listing)).   44:- use_module(swi(library/error)).   45:- use_module(swi(library/apply)).
 write_list(+List) is det
Writes a list to current output one element in each line.
   51write_list1(List) :-
   52	must_be(list, List),
   53	maplist(writeln, List).
 prettyvars(?Term)
Similar to numbervars(Term,0,_), except that singleton variables in Term are unified with '$VAR'('_'), so that when the resulting term is output with a write option numbervars(true), in the place of singleton variables _ is written. This predicate is used by portray_clause/2.
   63prettyvars(Term) :-
   64	numbervars(Term, 0, _, [singleton(true)]).
 printable_char(+Char) is semidet
Char is the code of a character which can be printed. Not really sure what this means. Mapped to code_type/2 using type graph.
   71printable_char(Char) :-
   72	code_type(Char, graph)