[Top][All Lists]

[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)


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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]