Completed
Details
Assignee
UnassignedUnassignedReporter
hyPiRionhyPiRionApproval
OkPatch
Code and TestPriority
MinorAffects versions
Fix versions
Details
Details
Assignee
Unassigned
UnassignedReporter
hyPiRion
hyPiRionApproval
Ok
Patch
Code and Test
Priority
Affects versions
Fix versions
Created December 19, 2012 at 2:34 AM
Updated July 31, 2015 at 9:39 PM
Resolved July 31, 2015 at 9:39 PM
The star-directive in
clojure.pprint/cl-format
with an at-prefix (~n@*
) does not obey its specifications according to Common Lisp the Language, 2nd Edition. There are two bugs within~n@*
as of right now:When
~n@*
is supposed to jump forward over more than one argument, it jumps one step backward as if it had seen~:*
. For instance,(cl-format nil "~D ~3@*~D" 0 1 2 3)
will return"0 0"
and not"0 3"
as expected.When
~@*
is seen, the formatter is supposed to jump to the first argument (asn
defaults to0
, see specification linked above). However, whenever a~@*
-directive is seen, the formatter jumps to the second argument instead.Inside a clean Clojure repl, perform these steps:
The format strings which reproduce the problem has been compared with the
format
function from the Common Lisp implementations SBCL, CLisp and Clozure. All of them print the expected output.Patch: clj-1134-star-directive-in-cl-format.txt
Screened by: Alex Miller