[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
combining ~{ with v paramaters in format string
From: |
Ernest Adrogué |
Subject: |
combining ~{ with v paramaters in format string |
Date: |
Mon, 26 Jun 2017 15:08:10 +0200 |
User-agent: |
NeoMutt/20170306 (1.8.0) |
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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- combining ~{ with v paramaters in format string,
Ernest Adrogué <=