This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
[bug] format in script
- To: guile at sourceware dot cygnus dot com
- Subject: [bug] format in script
- From: Shuji Narazaki <narazaki at cs dot cis dot nagasaki-u dot ac dot jp>
- Date: 17 Jan 2000 15:21:31 +0900
- Date: 17 Jan 2000 15:21:30 +0900
Hi,
Scheme-version format (in the CVS guile) doesn't work in script mode:
$ cat test-format
#!/usr/local/bin/guile -s
!#
(use-modules (ice-9 format))
(format #t "~A ~a\n" "REPLACED" "replaced")
$ ./test-format
REPLACED ~a
$
And the following patch seems to fix it (why?):
Index: ice-9/format.scm
===================================================================
RCS file: /cvs/guile/guile/guile-core/ice-9/format.scm,v
retrieving revision 1.3
diff -u -r1.3 format.scm
--- format.scm 1999/09/11 17:51:09 1.3
+++ format.scm 2000/01/17 06:12:46
@@ -1670,7 +1670,8 @@
(define format:abort (lambda () (error "error in format")))
-(define format format:format)
+;(define format format:format)
+(variable-set! (builtin-variable 'format) format:format)
;; If this is not possible then a continuation is used to recover
;; properly from a format error. In this case format returns #f.
------------
regards,
--
narazaki