These functions all take an optional argument called output-stream,
which is where to send the output. If unsupplied or nil, output-stream
defaults to the value of the variable
*standard-output*. If it is t, the value of the variable
*terminal-io* is used.

The printed representation of object is written to the output stream
specified by :stream, which defaults to the value of *standard-output*.

The other keyword arguments specify values used to control the
generation of the printed representation. Each defaults to the
value of the corresponding global variable: see *print-escape*,
*print-radix*, *print-base*, *print-circle*, *print-pretty*,
*print-level*, *print-length*,
*print-case*,
*print-array*,
and *print-gensym*.
(This is the means by which these variables affect printing operations:
supplying default values for the write function.)
Note that the printing of symbols is also affected by the value
of the variable *package*.
write returns object.

X3J13 voted in June 1989 (DATA-IO) to add the keyword argument
:readably to the function write, and voted in June 1989 (PRETTY-PRINT-INTERFACE)
to add the keyword arguments :right-margin, :miser-width, :lines,
and :pprint-dispatch.
The revised description
is as follows.

The printed representation of object is written to the output stream
specified by :stream, which defaults to the value of *standard-output*.

The other keyword arguments specify values used to control the
generation of the printed representation. Each defaults to the
value of the corresponding global variable: see *print-escape*,
*print-radix*, *print-base*, *print-circle*, *print-pretty*,
*print-level*, *print-length*, and *print-case*, in addition to
*print-array*,
*print-gensym*,
*print-readably*,
*print-right-margin*,
*print-miser-width*,
*print-lines*,
and *print-pprint-dispatch*.
(This is the means by which these variables affect printing operations:
supplying default values for the write function.)
Note that the printing of symbols is also affected by the value
of the variable *package*.
write returns object.

prin1 outputs the printed representation of object to
output-stream. Escape characters are used as appropriate.
Roughly speaking, the output from prin1 is suitable for input to
the function read. prin1 returns the object as its value.

print is just like prin1 except that the printed representation
of object is preceded by a newline (see terpri)
and followed by a space.
print returns object.

pprint is just like print except that the trailing
space is omitted and the
object is printed with the *print-pretty* flag non-nil
to produce ``pretty'' output.
pprint returns no values (that is, what the expression
(values) returns: zero values).

princ is just like prin1 except that the
output has no escape characters. A symbol is printed as simply the characters
of its print name; a string is printed without surrounding double quotes;
and there may be differences for other data types as well.
The general rule is that output from princ is intended to look
good to people, while output from prin1 is intended to
be acceptable to the function read.

X3J13 voted in June 1987 (PRINC-CHARACTER)
to clarify that princ prints a character in exactly
the same manner as write-char: the character is simply sent to the output stream.
This was implied by the specification in section 22.1.6 in the first edition,
but is worth pointing out explicitly here.

write-string writes the characters of the specified
substring of string to
the output-stream. The :start and :end parameters
delimit a substring of string in the usual manner
(see chapter 14).
write-line does the same thing but then
outputs a newline afterwards. (See read-line.)
In either case, the string is returned (not the substring
delimited by :start and :end).
In some implementations these may be much
more efficient than an explicit loop using write-char.

The function terpri outputs a newline to output-stream.
It is identical in effect to
(write-char #\Newline output-stream); however,
terpri always returns nil.

fresh-line is similar to terpri but outputs a newline
only if the stream is not already at the start of a line.
(If for some reason this cannot be determined, then a newline
is output anyway.)
This guarantees that the stream will be on a ``fresh line'' while
consuming as little vertical distance as possible.
fresh-line is a predicate that is true if it output a
newline, and otherwise false.

Some streams may be implemented in an asynchronous or buffered manner.
The function finish-output attempts to ensure that all output
sent to output-stream has reached its destination, and only then
returns nil. force-output initiates the emptying of any
internal buffers but returns nil without waiting for completion
or acknowledgment.

The function clear-output, on the other hand, attempts to abort any
outstanding output operation in progress in order
to allow as little output as possible
to continue to the destination. This is useful, for example, to abort
a lengthy output to the terminal when an asynchronous error occurs.
clear-output returns nil.

The precise actions of all three of these operations are
implementation-dependent.

X3J13 voted in June 1989 (DATA-IO) to add
print-unreadable-object,
which will output a printed representation of object on stream,
beginning with
#< and ending with >. Everything output to the stream during
execution of the body
forms is enclosed in the angle brackets. If type is true, the body
output is preceded by a brief description of the object's type and a
space character. If id is true, the body output is followed by
a space character and a representation of the object's identity,
typically a storage address.

If *print-readably* is true, print-unreadable-object signals an error
of type print-not-readable without printing anything.

The object, stream, type, and id arguments are all evaluated
normally. The type and id default to false. It is valid to provide
no body forms. If type and id are both true and there are no
body forms, only one space character separates the printed type and the printed identity.

The big advantage of
print-unreadable-object is that it allows a user to write print-object methods that
adhere to implementation-specific style without requiring the user to write
implementation-dependent code.

The X3J13 vote left it unclear whether print-unreadable-object
permits declarations to appear before the body of the macro call.
I believe that was the intent, and this is reflected in the syntax shown above;
but this is only my interpretation.