I attempted to run a gambit scheme script that was previously run with guile. I noticed that gambit fails because it is missing the "format" function.
Is format not part of scheme?
(format #t "example(~a)=<~a>\n" i (example i))
Instead I modified my gambit script to the following.
(display (string-append "example(" (number->string i) ")=<" (number->string (example i)) ">\n"))
What am I missing here? Thanks.
SRFI 28 is quite limited.
You can write yourself a macro, which provides a similar functionality:
This gives you a
printf
which understands~a
,~s
and~%
:Or even shorter:
~~
is not necessary, because the format directives are stand-alone symbols instead of embedded strings. SRFI 28 gives you nothing more.