Re: printf error

Mario Domenech Goulart via Chicken-users <[email protected]>
Newsgroups gmane.lisp.scheme.chicken
Message-ID <[email protected]>
Hi Duke,

On Thu, 27 Feb 2025 12:49:05 -0700 Duke Normandin via Chicken-users <[email protected]> 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 (rev e31bbee5)
> linux-unix-gnu-x86-64 [ 64bit dload ptables ]
>
> #;38> (printf "Hello, ~a.\n" "World")
> Error: unbound variable: printf
>         Call history:
>         <syntax>          (printf "Hello, ~a.\n" "World")
>         <eval>    (printf "Hello, ~a.\n" "World")       <--

printf is in the chicken.format module [0], which you'd need to import.
Example:

  (import (chicken format))

[0] https://wiki.call-cc.org/man/5/Module%20(chicken%20format)

All the best.
Mario
-- 
http://parenteses.org/mario
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.