<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">I was just playing with macros trying to emulate other languages grammar, and I manage to crash DrScheme v350 consistently.  Here is the code:<DIV><BR class="khtml-block-placeholder"></DIV><DIV>(define-syntax loop</DIV><DIV>  (syntax-rules ()</DIV><DIV>    ((loop n expr1 expr2 ...)</DIV><DIV>     (let iterate ([i 0])</DIV><DIV>       (set! i (add1 i))</DIV><DIV>       (if (&lt;= i n)</DIV><DIV>           (begin</DIV><DIV>             expr1 expr2 ...</DIV><DIV>             (iterate i)))))))</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>(define-syntax ++</DIV><DIV>  (syntax-rules ()</DIV><DIV>    ((++ val) (begin</DIV><DIV>                (set! val (+ val 1))</DIV><DIV>                val))))</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>(define i 0)</DIV><DIV>(loop 10</DIV><DIV>      (printf "~a~n" (++ val)))  </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I know the error is that val is not defined, however DrScheme doesn't signal this instead it tries to execute and then it crashes. Should this behavior happen?</DIV><DIV><BR class="khtml-block-placeholder"><DIV><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Arial"><SPAN class="Apple-style-span" style="font-family: Arial; ">-- Jaime</SPAN></FONT></DIV></SPAN> </DIV><BR></DIV></DIV></BODY></HTML>