Controls escaping when printing potential numbers that are not actually numbers.
hcl
t
The variable *print-escape-potential-numbers*
controls whether the Lisp printer escapes symbols whose names have the syntax of a potential number but do not actually have the syntax of a number. Such symbols are printed without escapes when *print-escape-potential-numbers*
is nil
and printed with escapes otherwise.
*print-escape-potential-numbers*
has no effect when escaping is off, that is when both *print-readably* and *print-escape* are nil
.
The section Potential Numbers as Tokens in the Common Lisp HyperSpec specifies that symbols with names that are potential numbers need to be printed with escapes when escaping is on. This is the default behaviour in LispWorks. If the value of *print-escape-potential-numbers*
is nil
, then the printer escapes only symbol names that would read as numbers with the current read settings.
Prior to LispWorks 8.1, all potential numbers were printed with escapes.
(prin1-to-string '5h__h) => "|5H__H|" ; escaped because it is a potential number (let ((*print-escape-potential-numbers* nil)) (prin1-to-string '5h__h)) => "5H__H" ; not escaped because not readable as number (let ((*print-escape-potential-numbers* nil)) (prin1-to-string '5\.6)) => "|5.6|" ; escaped because readable as number
LispWorks® User Guide and Reference Manual - 18 Feb 2025 15:32:21