* combining ~{ with v paramaters in format string
@ 2017-06-26 13:08 Ernest Adrogué
0 siblings, 0 replies; only message in thread
From: Ernest Adrogué @ 2017-06-26 13:08 UTC (permalink / raw)
To: guile-user
Hi,
I'm having a little trouble with a format string, using the "format"
module. The following two lines produce the same output: "a b".
(format #t "~a ~a~%" "a" "b")
(format #t "~{~a ~a~%~}" '("a" "b"))
Now the same thing but adding an argument to give the length of the
first element:
(format #t "~va ~a~%" 6 "a" "b")
(format #t "~{~va ~a~%~}" '(6 "a" "b"))
The first one works as expected, it prints "a b", whereas the
second one doesn't, it says "error in format".
Is it not possible to use ~{ together with parameters given as
arguments?
Cheers.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-06-26 13:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-26 13:08 combining ~{ with v paramaters in format string Ernest Adrogué
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).