Opened 12 years ago

Last modified 9 years ago

#574 new defect

format vs. *print-circle*

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


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 9 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:

Note: See TracTickets for help on using tickets.