Skip to content
New issue

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

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

Already on GitHub? # to your account

printf doesn't work as expected #420

Closed
pfefferminz132 opened this issue Oct 31, 2015 · 2 comments
Closed

printf doesn't work as expected #420

pfefferminz132 opened this issue Oct 31, 2015 · 2 comments

Comments

@pfefferminz132
Copy link

(printf "%d" 42) gives some strange and unexpected output.

@heyLu
Copy link
Member

heyLu commented Oct 31, 2015

Use the typical printing functions from Clojure. (print, println, pr and prn)

Our printf function only accepts a single string as an argument. Not sure if the FFI can handle the full signature for printf yet. Also, printf returns the number of bytes written, which might contribute to the confusing output.

@heyLu heyLu closed this as completed Oct 31, 2015
@pfefferminz132
Copy link
Author

clojure has printf, too and it works like it supposed to. pixie's printf accepts more than one argument
e.g. (printf "%d and %d" 42 43). It's just not the output that one expects.
(printf "%s and %s" 42 43) segfaults.

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

No branches or pull requests

2 participants