output in PrologOutput in Prolog is not always needed,
as often the variable
return all the information that is required. If explicit output is
required, a set of extra-logical built-in predicates is available.
write(X) which writes the term
X to the current output stream (which means the window on your workstation
unless you have done something fancy).
print(X, …) which writes a variable number of arguments to
the current output stream. If an argument is a string (like
'Hello world!\n') then the string is printed without quotes, and any
'\t' are interpreted as newline and tab,
A newline is printed at the end of the printing operation.
prin(X, …) is like
print except that it does not
append a newline to the end of the output.
tab(N) prints N spaces to output -
N should be a number.
nl starts a new line.
put(C) prints a single character to the current output
stream. C might be bound to a number in the range 0 to 255, in which
case the number is treated as a character code, and the equivalent
character is printed, or it might be bound to a character, e.g.
C = 'a', in which case obviously the character is