William Harold Newman <wnewman@...> writes:
> (FORMAT NIL "~S ~S" '1W '1WW) => "|1W| 1WW" seems to be
> correct after all.
> MARKER ; number marker in a numeric number...
> + ;; ("What," you may ask, "is a 'number marker'?" It's something
> + ;; that a conforming implementation might use in number syntax.
> + ;; See ANSI 22.214.171.124 "Potential Numbers as Tokens".)
> (when (test letter) (advance OTHER nil))
> (go DIGIT))))
[ The issue is "are those vertical bars around |1W| correct?" ]
I don't think the potential number status of 1W is relevant in how it
prints, actually; although the _token_ 1W is a potential number, the
_symbol_ 1W isn't.
Since SBCL reads the token 1W as a symbol (for sufficiently low
*READ-BASE*; we haven't extended the syntax to make this potential
number read as a number), I don't think that it needs to have the
vertical bars printed (by ANSI 126.96.36.199). On the other hand, there
doesn't seem to be anything prohibiting the escaping on corner cases
like potential numbers, so maybe for cross-implementation READability
it is better to leave them.
http://www-jcsu.jesus.cam.ac.uk/~csr21/ +44 1223 510 299/+44 7729 383 757
(set-pprint-dispatch 'number (lambda (s o) (declare (special b)) (format s b)))
(defvar b "~&Just another Lisp hacker~%") (pprint #36rJesusCollegeCambridge)