Opened 10 years ago

Last modified 7 years ago

#574 new defect

format vs. *print-circle*

Reported by: heller Owned by:
Priority: normal Milestone:
Component: other Version: trunk
Keywords: Cc:

Description

format acts strangely when *print-cirlce* is set:

Welcome to Clozure Common Lisp Version 1.4-dev-r12463M-trunk (LinuxX8632)!
(let ((*print-circle* t)
      (a "foo") (b 'foo))
  (format nil "~{~a~^, ~}" (list a a b b)))
"#1=foo, #1#, FOO, FOO"
? 

The output should probably be: "foo, foo, FOO, FOO" or perhaps "#1=foo, #1#, #2=FOO, #2#" but the current output is just strange.

Change History (1)

comment:1 Changed 7 years ago by rme

It makes some sense, I think, given that symbols are interned. Something like "#2=FOO, #2#" isn't necessary to show the shared structure, since the FOOs are known to be EQ.

For the record, this message (and the associated thread) is relevant to this issue: http://clozure.com/pipermail/openmcl-devel/2012-January/013303.html

Note: See TracTickets for help on using tickets.