No subject
Thu Mar 26 00:47:06 EDT 2009
(syntax-case exp (literal ...) clause ...) syntax
Each /literal/ must be an identifier. Each /clause/ must take one of the
following two forms:
(pattern output-expression)
(pattern fender output-expression)
So in your case (display ...) is considered a fender and the syntax-case is
well-formed (although perhaps not what you intended). The fender is
evaluated, which prints output and returns an undefined value that is
interpreted as true. So the output-expression is returned.
When you add another expression to the clause, the syntax-case is no longer
well-formed. As the error message states, you have a "bad clause".
So just use (begin ...) or (let () ...) as you had in the original example.
HTH.
-d
More information about the plt-scheme
mailing list