Ticket #888 (closed defect: invalid)

Opened 3 years ago

Last modified 3 years ago

format can produce 0+3

Reported by: Arthur Owned by:
Priority: normal Milestone:
Component: ANSI CL Compliance Version: trunk
Keywords: Cc:

Description

In latest trunk, and afaik all earlier versions too, (format nil "~3,'0@D" 3) produces "0+3" - not "+03" as I'd expect.

Change History

comment:1 Changed 3 years ago by gb

  • Status changed from new to closed
  • Resolution set to invalid

22.3.2.2 (the description of ~D) says that "spaces are inserted on the left ..." and that if a pad character is provided it's used instead of #\space.

The output "0+3" certainly looks weird (if one is used to thinking of using #\0 as a pad character to produce leading zeroes), but the pad character just something that's "inserted on the left" if the digits and sign require fewer than mincol characters.

comment:2 Changed 3 years ago by gb

Uh, "the pad character IS just something ..."

Note: See TracTickets for help on using tickets.