GNU bug report logs -
#57226
format seemingly drops arguments when iterating tablature
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I would expect the following expression
(format #f "~@{~v,0,'-@t,~}" 1 2 3)
to return "-,--,---,", but it instead returns "--,---,"
Further, I would have expected
(format #f "~{~v,0,'-@t ~}" '(1 2 3))
to have the same results, but i throws an error:
scheme@(guile-user)> (format #f "~{~v,0,'-@t ~}" '(1 2 3))
FORMAT: error with call: (format #f "~{~v,0,'-@t ~}<===" (1 2 3) ===>)
missing argument(s)
FORMAT: INTERNAL ERROR IN FORMAT-ERROR!
destination: #f
format string: "~{~v,0,'-@t ~}"
format args: ((1 2 3))
error args: (#f "error in format" () #f)
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
error in format
If, however, I include a dummy "0" argument first, I get a (correct)
warning, but also the expected output:
scheme@(guile-user) [1]> (format #f "~{~v,0,'-@t ~}" 0 '(1 2 3))
;;; <unknown-location>: warning: "~{~v,0,'-@t ~}": wrong number of
`format' arguments: expected 1, got 2
$22 = "- -- --- "
This is using Guile 3.0.8, available from Nix as
/nix/store/6lx56ifqh9dznw3mkj2azmh1lmxr617g-guile-3.0.8. (i.e.,
guile_3_0 in a copy of nixpkgs a few days old)
This bug report was last modified 2 years and 303 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.