[plt-scheme] Re: Load and require in PLT

From: N T (npt11tpn at googlemail.com)
Date: Thu Jun 11 04:10:26 EDT 2009

mzscheme -r test.ss indeed works! Had #lang scheme in test.ss which
caused:
/test.ss:5:10: compile: unbound identifier in module in: x
Thank you very much for your suggestions!
parameters.ss is a user-options input file which is specific for each
run of test.ss and thought it would be simpler if used with load (i.e.
just (define x 1) etc) rather than as a module, but perhaps this is
not true ...
Nik


On Jun 10, 10:50 pm, Eli Barzilay <e... at barzilay.org> wrote:
> Looks like the problem might be due to using `mzscheme <file>' instead
> of `mzscheme -r <file>'.  (But a better solution is to dump the `load'
> stuff, and use modules.)
>
> On Jun 10, Matthias Felleisen wrote:
>
>
>
>
>
> > I used this load trick in script that has minimally evolved since  
> > 1995 when I first wrote it. What's the problem? Looks fine.
>
> > On Jun 10, 2009, at 10:24 AM, N T wrote:
>
> > > Hi guys,
> > > I am trying to find an equivalent way to run the following test.scm
> > > script with mzscheme.
> > > I would like to to keep s as a variable, so that it could be passed as
> > > a command-line argument.
> > > (require "parameters.scm") works in mzscheme while (require s) does
> > > not. From what i gathered from reading the plt archives using units
> > > could be the way to do it ...
> > > Help will be very much appreciated!
> > > Nik
>
> > > csi test.scm
>
> > > ;; test.scm
> > > (define s "parameters.scm")
> > > (load s)
> > > (display  x)
>
> > > ;; parameters.scm
> > > (define x 1)
> > > _________________________________________________
> > >   For list-related administrative tasks:
> > >  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> > _________________________________________________
> >   For list-related administrative tasks:
> >  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> --
>           ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
>                  http://www.barzilay.org/                Maze is Life!
> _________________________________________________
>   For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme


Posted on the users mailing list.