<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Courier New, Courier, monospace">Hi:<br>
<br>
3 questions...<br>
<br>
I'm looking for a "when" macro and tried one patterned on
"unless". It behaves like "when-not". How do I write a proper
"when" macro?<br>
<br>
(define-syntax when-not<br>
(syntax-rules ()<br>
((when-not test body ...)<br>
(if test #t (begin body ...)))))<br>
<br>
(define (test-when n) <br>
(when-not (not (< n 50))<br>
(println "line1 " n)<br>
(println "line2 " n)<br>
(println "line3 " n)))<br>
(test-when 0) (test-when 3) (test-when 55)<br>
;-------------------------------------------<br>
<br>
Re "define-syntax" the Gambit-C manual says .."Note that this
implementation of syntax-case does not support special forms that
are specific to Gambit." What are the implications of this
statement? Is there a preferred model for writing Gambit-C macros?<br>
;------------------------------------------------------------<br>
<br>
Some code has a "##" prefix like..<br>
</font>(##define-macro (err form)<br>
`(let ()<br>
(##declare (safe) (generic))<br>
(err-form (lambda () ,form))))<br>
<br>
Why is that?<br>
<br>
=bob=<br>
<br>
<code></code><font face="Courier New, Courier, monospace"> </font>
</body>
</html>