JRStern <JXSternChangeX2R@gte.net> wrote:
| As others have said, you just build up source text in a variable,
| then Eval() the variable.
Correction: In Common Lisp, EVAL works on Lisp *objects*, not
test strings per se. Or more precisely, if you EVAL a text string,
you only get back the string itself (since strings are self-evaluating
(eval "(+ 2 3)") ==> "(+ 2 3)"
What you usually want to feed to EVAL is a *data structure* that
represents a valid Lisp program, e.g.:
(eval (list '+ 2 3)) ==> 5
It's the READ procedure (including variants such as READ-FROM-STRING
and the READ that's an implicit part of LOAD), with all of its
programmability (see CLHS "2.1.1 Readtables") that converts source
text into Lisp data structures.
Those resulting data structures might or might not get passed to EVAL,
depending on who did the READ and why. In the following case, it does:
(list #\( #\+ #\space #\2 #\space #\3 #\))
But in other cases, the application just wants to use the resulting
data structure for its own purposes.
Rob Warnock, 30-3-510 <email@example.com>
SGI Network Engineering <http://www.rpw3.org/>
1600 Amphitheatre Pkwy. Phone: 650-933-1673
Mountain View, CA 94043 PP-ASEL-IA
[Note: firstname.lastname@example.org and email@example.com aren't for humans ]