[plt-scheme] drscheme repl vs mzscheme
The difference is being inside a module or in the top level.
To answer the question I suspect you're really asking. I.e. how to get
eval working inside a module:
Eval uses the bindings in the current namespace to work out what
values correspond to the symbols in the s-exp being evaled. By default
the namespace inside a module is empty, while at the top level it is
populated with (I think) the bindings from scheme/base
So, to eval inside a module you need to create a namespace that is not
empty. The following program illustrates this:
#lang scheme
(parameterize ([current-namespace (make-base-namespace)])
(eval '(+ 1 2)))
HTH,
N.
On Tue, Jun 23, 2009 at 4:30 AM, Skeptic .<skeptic2000 at hotmail.com> wrote:
>
> Oops, I said REPL, but in fact I run it from the definitions.
>
> So, real question is what is the difference from definitions vs REPL ;)
>
> Thanks