14 Jul 2009 08:26
Four problems with Scheme 48 1.8
Martin Ward <martin <at> gkc.org.uk>
2009-07-14 06:26:00 GMT
2009-07-14 06:26:00 GMT
(1) Compiling with gcc version 4.4.0 gives an error on "make test":
FAILURES:
Test case *3 [misc-big-tests] FAILED:
From expression (* 47123 46039) EXPECTED value 2169495797 of 2169495797
INSTEAD got -2125471499
'(#{Check-failure #{Test-case *3} (actual (* 47123 46039) -2125471499)
(expected 2169495797 2169495797) #{Procedure 983 (equal? in
scheme-level-1)}})
Compiling with gcc 4.0.1 seems to work OK.
(2) I cannot figure out how to define a macro such as:
(defmacro substr (str from . rest)
(if (null? rest)
; two argument form of substr:
`(let ((s ,str))
(substring s ,from (string-length s)))
; three argument form of substr:
`(substring ,str ,from (+ ,from , <at> rest))))
SCM and the Hobbit compiler support defmacro, Gambit can define defmacro as:
(define-macro (defmacro name args . body)
`(define-macro (,name , <at> args) , <at> body))
(3) scheme48 won't accept ++ as a symbol name for some reason:
(Continue reading)
RSS Feed