Mezzano icon indicating copy to clipboard operation
Mezzano copied to clipboard

FORMAT ~f parameters not handled correctly

Open 3b opened this issue 4 years ago • 2 comments

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

3b avatar Mar 08 '20 19:03 3b

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

fitzsim avatar Mar 09 '24 07:03 fitzsim

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

vinajuliette avatar Jul 09 '24 20:07 vinajuliette