[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Scm-discuss] cannot use syntax-rules in scm 5e5
From: |
Shuangyang Yang |
Subject: |
[Scm-discuss] cannot use syntax-rules in scm 5e5 |
Date: |
Sun, 8 Jun 2008 22:14:45 -0400 |
Hi all,
I downloaded SCM 5e5 from the website and try to learn macro. When I
tried the examples in the scm manual, I confronted an error saying
that "syntax-rules" is "unbounded variable", while "define-syntax" is
defined. I don't know what happens and cannot find any information
through Google. Is there any file I need to load first? Hope anyone
can help me. Thank you very much.
(On windows XP system)
SCM version 5e5, Copyright (C) 1990-2006 Free Software Foundation.
SCM comes with ABSOLUTELY NO WARRANTY; for details type `(terms)'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `(terms)' for details.
;loading D:\slib\require
;done loading D:\slib\require.scm
;loading D:\scm\Transcen
;done loading D:\scm\Transcen.scm
> define-syntax
(address@hidden . #<primitive-macro! #<primitive-procedure defsyntax>>)
> syntax-rules
;ERROR: "D:\\scm\\Init5e5.scm":
unbound variable: syntax-rules
; in scope:
; (dumped?) procedure boot-tail
; defined by load: "D:\\scm\\Init5e5.scm"
;STACK TRACE
1; syntax-rules
> (define-syntax eight
(syntax-rules ()
(_ 8)))
;ERROR: unbound variable: syntax-rules
; in expression: (syntax-rules () (_ 8))
; in top level environment.
;STACK TRACE
1; #<unspecified>
2; (define-syntax eight (syntax-rules () (_ 8)))
(On Linux System, both "define-syntax" and "syntax-rules" are undefined. )
SCM version 5e5, Copyright (C) 1990-2006 Free Software Foundation.
SCM comes with ABSOLUTELY NO WARRANTY; for details type `(terms)'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `(terms)' for details.
;loading /usr/local/lib/slib/require
;done loading /usr/local/lib/slib/require.scm
> define-syntax
;ERROR: "/usr/local/lib/scm/Init5e5.scm": unbound variable: define-syntax
; in scope:
; (dumped?) procedure boot-tail
; defined by load: "/usr/local/lib/scm/Init5e5.scm"
;STACK TRACE
1; define-syntax
> (define-syntax eight
(syntax-rules ()
(_ 8)))
;ERROR: unbound variable: define-syntax
; in expression: (define-syntax eight (syntax-rules () (_ 8)))
; in top level environment.
;STACK TRACE
1; #<unspecified>
2; (define-syntax eight (syntax-rules () (_ 8)))
> syntax-rules
;ERROR: unbound variable: syntax-rules
; in top level environment.
;STACK TRACE
1; syntax-rules
--
Shuangyang Yang
Graduate Research Associate
Electro-Optics Program
University of Dayton, OH
(937)-229-2755
- [Scm-discuss] cannot use syntax-rules in scm 5e5,
Shuangyang Yang <=