2008/12/9 Pach Roman (DGS-EC/ESG3) <[EMAIL PROTECTED]>: > I've performed following two short tests. > > test 1: > ------- > > (use-syntax (ice-9 syncase)) > > (define-syntax my-macro-1 > (syntax-rules () > ((_ par1 par2 par3) > (begin > (string-concatenate (list par1 par2 par3)) > )))) > > (define (dummy) > (my-macro-1 "a" "b" "c")) > > (format #t "dummy => ~s\n" (procedure-source dummy)) > > result: > dummy => (lambda () (string-concatenate (list "a" "b" "c"))) > > test 2: > ------- > (define-macro (my-macro-2 par1 par2 par3) > (string-concatenate (list par1 par2 par3))) > > (define (dummy) > (my-macro-2 "a" "b" "c") > ) > (dummy) > (format #t "dummy => ~s\n" (procedure-source dummy)) > > result: > dummy => (lambda () "abc") > > It seems to me the define-syntax is broken in version "1.8.2" > or I've done something wrong.
These examples both look good to me. Which one do you think is wrong? It may help if I point out that define-macro usage usually involves backquoting. The define-macro version of your define-syntax example would normally be: (define-macro (my-macro-2 par1 par2 par3) `(string-concatenate (list ,par1 ,par2 ,par3))) Regards, Neil