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> (spr
(printf "Hello, ~a.\n" "World") ;; => Hello, World
~a.\n
There is no lowercase `a' special formatting directive or a
`dot .' shown at
https://api.call-cc.org/5/doc/chicken/format/printf.
Is that a typo? s/b ~A ?? Is the . a typo as well?
The \n is explained though. TIA ...
--
Duke
On Thu, 27 Feb 2025 13:00:48 -0700
spiros thanasoulas wrote:
> Hey Duke, you need to import (chicken format)
> #;1> (import (chicken format))
Got it!
> ;
> loading /home/dsp/mychicken/lib/chicken/11/chicken.format.import.so ...
> #;2> (printf "hello\n")
> hello
> in the future
> you can a
On Thu, 27 Feb 2025 19:58:11 +
siiky wrote:
> printf comes from the (chicken format) module, which is not
> imported. Looks like a mistake in the site.
Got it .. thx!
--
Duke
Hi Duke,
On Thu, 27 Feb 2025 12:49:05 -0700 Duke Normandin via Chicken-users
wrote:
> In "Learn X in Y minutes" / Chicken:
>
> (printf "Hello, ~a.\n" "World") ;; => Hello, World
>
> On my machine:
> CHICKEN
> (c) 2008-2021, The CHICKEN Team
> (c) 2000-2007, Felix L. Winkelmann
> Version 5.3.0
On Thu, Feb 27, 2025 at 12:49:05PM -0700, Duke Normandin via Chicken-users
wrote:
> In "Learn X in Y minutes" / Chicken:
>
> (printf "Hello, ~a.\n" "World") ;; => Hello, World
>
> On my machine:
> CHICKEN
> (c) 2008-2021, The CHICKEN Team
> (c) 2000-2007, Felix L. Winkelmann
> Version 5.3.0 (re
printf comes from the (chicken format) module, which is not imported. Looks
like a mistake in the site.
https://api.call-cc.org/5/doc/chicken/format/printf
$ csi -n
CHICKEN
(c) 2008-2022, The CHICKEN Team
(c) 2000-2007, Felix L. Winkelmann
Version 5.4.1 (rev 268dfc88)
linux-unix-gnu-x86-64 [ 64b
In "Learn X in Y minutes" / Chicken:
(printf "Hello, ~a.\n" "World") ;; => Hello, World
On my machine:
CHICKEN
(c) 2008-2021, The CHICKEN Team
(c) 2000-2007, Felix L. Winkelmann
Version 5.3.0 (rev e31bbee5)
linux-unix-gnu-x86-64 [ 64bit dload ptables ]
#;38> (printf "Hello, ~a.\n" "World")
Erro