From: "Ernest Adrogué" <nfdisco@gmail.com>
To: guile-user@gnu.org
Subject: combining ~{ with v paramaters in format string
Date: Mon, 26 Jun 2017 15:08:10 +0200 [thread overview]
Message-ID: <20170626130810.bvpacb2di54ei5mx@doriath.local> (raw)
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.
reply other threads:[~2017-06-26 13:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170626130810.bvpacb2di54ei5mx@doriath.local \
--to=nfdisco@gmail.com \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).