froggey / Mezzano

An operating system written in Common Lisp
MIT License
3.52k stars 188 forks source link

FORMAT ~f parameters not handled correctly #155

Open 3b opened 4 years ago

3b commented 4 years ago

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

fitzsim commented 3 months ago

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