When *PRINT-READABLY* is true, other arrays are written as
follows: if the ARRAY-ELEMENT-TYPE is T, the syntax
is used.
Otherwise, the syntax # rankAcontents#A( is used.element-type dimensions
contents)
As explicitly permitted by this section, specialized BIT and
CHARACTER ARRAYs are printed with the innermost lists generated
by the printing algorithm being instead printed using BIT-VECTOR and
STRING syntax, respectively.
Variable CUSTOM:*PRINT-EMPTY-ARRAYS-ANSI*. Empty ARRAYs, i.e., arrays with no elements and zero
ARRAY-TOTAL-SIZE (because one of its dimensions is zero) are printed
with the readable syntax #A(, unless the variable element-type dimensions
contents)CUSTOM:*PRINT-EMPTY-ARRAYS-ANSI* is
non-NIL, in which case the arrays are printed using the
[ANSI CL standard ]-prescribed syntax
which often loses the dimension information.# rankAcontents
Pathnames are printed as follows: If *PRINT-ESCAPE* is NIL,
only the namestring is printed; otherwise it is printed with the
#P syntax, as per the [ANSI CL standard ] issue PRINT-READABLY-BEHAVIOR:CLARIFY.
But, if *PRINT-READABLY* is true, we are in trouble as #P is
ambiguous (which is verboten when *PRINT-READABLY* is true), while
being mandated by the [ANSI CL standard ].
Therefore, in this case, CLISP's behavior is determined by the value
of CUSTOM:*PRINT-PATHNAMES-ANSI*: when it is NIL, we print pathnames like this:
.
Otherwise, when the variable #-CLISP #P"..."
#+CLISP #S(PATHNAME ...)CUSTOM:*PRINT-PATHNAMES-ANSI* is non-NIL, the
#P notation is used as per [sec_1-5-1-4-1]
"Resolution of Apparent Conflicts in Exceptional Situations".
The #S notation for PATHNAMEs is used
extensively in the [Common Lisp HyperSpec ] (see examples for PATHNAME,
PATHNAMEP, PARSE-NAMESTRING et al), but was decided against, see
PATHNAME-PRINT-READ:SHARPSIGN-P.
When both *PRINT-READABLY* and CUSTOM:*PRINT-PATHNAMES-ANSI* are
non-NIL and the namestring will be parsed to a dissimilar object
(with the current value of CUSTOM:*PARSE-NAMESTRING-DOT-FILE*), an ERROR of type
PRINT-NOT-READABLE is SIGNALed.
| These notes document CLISP version 2.49 | Last modified: 2010年07月07日 |