GNU bug report logs - #20512
bogus warning with (format) and ~{ ~}

Previous Next

Package: guile;

Reported by: Daniel Llorens <daniel.llorens <at> bluewin.ch>

Date: Wed, 6 May 2015 09:17:02 UTC

Severity: normal

To reply to this bug, email your comments to 20512 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#20512; Package guile. (Wed, 06 May 2015 09:17:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daniel Llorens <daniel.llorens <at> bluewin.ch>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Wed, 06 May 2015 09:17:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Daniel Llorens <daniel.llorens <at> bluewin.ch>
To: bug-guile <at> gnu.org
Subject: bogus warning with (format) and ~{ ~}
Date: Wed, 6 May 2015 11:16:04 +0200
Hello,

this is with current master, I don't know what stable 2.0 does, although I don't think it's changed there.

scheme@(guile-user)> (format #t "~{~{~a~^ ~}\n~}" '((1 2) (3 4)))
;;; <stdin>:1:0: warning: "~{~{~a~^ ~}\\n~}": wrong number of `format' arguments: expected 2, got 1
1 2
3 4
$1 = #t

apparently it only happens with double nesting, e.g. triple nesting is fine:

scheme@(guile-user)> (format #t "~{~{~{~a~^:~}~^ ~}\n~}" '(((1 2) (3 4)) ((5 6) (7 8))))
1:2 3:4
5:6 7:8
$2 = #t

Regards,

	Daniel





Information forwarded to bug-guile <at> gnu.org:
bug#20512; Package guile. (Mon, 16 Sep 2019 15:20:01 GMT) Full text and rfc822 format available.

Message #8 received at 20512 <at> debbugs.gnu.org (full text, mbox):

From: levenson <at> mmer.org
To: 20512 <at> debbugs.gnu.org
Subject: bug#20512: bogus warning with (format) and ~{ ~}
Date: Mon, 16 Sep 2019 17:06:26 +0200
I encounter similar behavior, but for dynamic padding, but it one case
it doesn't even work. I am using guile 2.2.6 from guix distro

scheme@(guile-user)> (format #f "~:{~v_ ~a ~}" '((5 "hello")))

FORMAT: error with call: (format #f "~:{~v_ ~a ~}<===" ((5 hello)) ===>)
        missing argument(s)
In ice-9/format.scm:
  1590:19  2 (format #f "~:{~v_ ~a ~}" ((5 "hello")))
   197:20  1 (format:format-work "~:{~v_ ~a ~}" (((5 "hello"))))
In unknown file:
           0 (scm-error misc-error #f "~A" ("error in format") #f)
error in format

Added the bogus 0 which doesn't do anything

scheme@(guile-user)> (format #f "~:{~v_ ~a ~}" 0 '((5 "hello")))
;;; <stdin>:3:0: warning: "~:{~v_ ~a ~}": wrong number of `format' arguments: expected 1, got 2
$1 = "      hello "


-- 
Alexey




This bug report was last modified 5 years and 271 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.