Re: special formatting directives for printf

siiky via Chicken-users <[email protected]>
Newsgroups gmane.lisp.scheme.chicken
Message-ID <[email protected]>
I don't usually use printf and friends, but it appears the directives are case-insensitive:

#;1> (sprintf "~a~%" "asdf")
"asdf\n"
#;2> (sprintf "~A~%" "asdf")
"asdf\n"
#;3> (sprintf "~S~%" "asdf")
"\"asdf\"\n"
#;4> (sprintf "~s~%" "asdf")
"\"asdf\"\n"
#;5> (sprintf "~b~%" 42)
"101010\n"
#;6> (sprintf "~B~%" 42)
"101010\n"

The code appears to suggest it too:

https://code.call-cc.org/cgi-bin/gitweb.cgi?p=chicken-core.git;a=blob;f=extras.scm;h=921706b477d63a53c1e0807da43c905e0114669b;hb=HEAD#l383
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.