[gambit-list] file local defines

lowly coder lowlycoder at huoyanjinjing.com
Fri Jun 26 19:35:09 EDT 2009


; foo.scm

(magical-define x 100)

; bar.scm

(define y (+ x 10)) ;

; all.scm

(load "foo")
(load "bar") ; <-- I want this here to be a syntax error

Is there a way I make defines/variables _local_ to a single *.scm file? I
promise to not 'include it, and only 'load it. In essence, I'm looking for
the equiv of static vars in C. What I don't want to do is something like:

;foo .scm
(lambda ()
  ... all of foo.scm
)

; ... since there are other parts of foo.scm that I do want to be visible.

Yes, I do realize that what I'm asking for sounds like the basics of a
module system.

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://webmail.iro.umontreal.ca/pipermail/gambit-list/attachments/20090626/6233d585/attachment.html 


More information about the Gambit-list mailing list