Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FORMAT ~f parameters not handled correctly #155

Open
3b opened this issue Mar 8, 2020 · 2 comments
Open

FORMAT ~f parameters not handled correctly #155

3b opened this issue Mar 8, 2020 · 2 comments

Comments

@3b
Copy link

3b commented Mar 8, 2020

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
Copy link
Collaborator

fitzsim commented Mar 9, 2024

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

@vinajuliette
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants