Re: problem with pprint dispatch

Gary Byers <[email protected]> Mon, 9 Jan 2006 06:10:58 -0700 (MST)
Newsgroups gmane.lisp.openmcl.bugs
Message-ID <[email protected]>
The initial value of *PRINT-PRETTY* is implementation-dependent.
It's false/NIL in OpenMCL; it may be non-NIL in other implementations
(and apparently is in SBCL.)

When *PRINT-PRETTY* is true, OpenMCL seems to use the pprint dispatch
table as it should (at least in your example.)

On Mon, 9 Jan 2006, [ISO-8859-1] Sebastián González wrote:

> I'm trying to define my own printer function for the 'vector type, by
> means of set-pprint-dispatch.
> In SBCL the following code works, but in OpenMCL it doesn't:
>
> (set-pprint-dispatch
> 'vector
> #'(lambda (stream object)
>      (print-unreadable-object (object stream :type nil :identity nil)
>        (format stream "OBJECT")
>        (loop
>           with *print-circle* = t
>           with *print-level* = 1
>           for slot across (subseq object 1)
>           do (format stream " ~a" slot)))))
>
> (format t "~a~%" (make-array 3 :initial-contents '(9 8 7)))
>
> => #<OBJECT 8 7>       (in SBCL - calls my custom vector printer)
> => #(9 8 7)                       (in OpenMCL - calls the default
> vector printer)
>
> I use OpenMCL version 1.0 (beta: DarwinPPC64).
>
> _______________________________________________
> Bug-openmcl mailing list
> [email protected]
> http://clozure.com/mailman/listinfo/bug-openmcl
>
>

_______________________________________________
Bug-openmcl mailing list
[email protected]
http://clozure.com/mailman/listinfo/bug-openmcl