froggey/Mezzano

FORMAT ~f parameters not handled correctly

Opened this issue · 2 comments

3b commented

see http://www.lispworks.com/documentation/HyperSpec/Body/22_cca.htm

(format t "~,5f" 1) errors with "The value of MEZZANO.FORMAT::PADCHAR is 5, which is not of type CHARACTER." which would be correct for ~,5d but not ~,5f.

(format t "~,5f" 1.0) prints 1.0 instead of 1.00000

(format t "~15,5f" 1.0) prints 1.0 instead of

        1.0000

(format t "~15,5,,,'+f" 1) errors with Too Many Parameters instead of printing ++++++++1.00000

Neither of the errors happen for me on current code. But I can replicate the formatting issues.

No errors either but I too can replicate the wrong output issue:
SBCL 2.4.5:

* (format t "~,5f" 1)
1.00000
NIL
* (format t "~,5f" 1.0)
1.00000
NIL
* (format t "~15,5f" 1.0)
        1.00000
NIL
* (format t "~15,5,,,'+f" 1)
++++++++1.00000
NIL

Mezzano d5:

* (format t "~,5f" 1)
1.0
NIL
* (format t "~,5f" 1.0)
1.0
NIL
* (format t "~15,5f" 1.0)
1.0
NIL
* (format t "~15,5,,,'+f" 1)
1.0
NIL