The discussion in this topic is aimed at better understanding how the principle "there is no difference between code and data in LISP" works in practice. My intention was to "execute" comand-variables containing LISP code as their values (like variable "command") so that all variables which appear in this code assume local values within current lexical environment during the execution. And macro "true-eval" does this job! It may fail in some other situations like in your input-output operators (in some implementations). In my implementation (Allegro CL), both your input-output codes with EVAL and TRUE-EVAL work identically without problems.

Yes, for that macros are good.But I've wanted to point the difference between a runtime evaluation and a macroexpansion out (beacuse I didn't know you don't want the normal evaluation). Try in Allegro CL to factor out what was in the loop.

gives an error unless "x" already has some value. My suggestion to those who read this forum and who plan to improve/better implement such a great langage as LISP is to take more attention to the evaluation operations.

abvgdeika wrote:The discussion in this topic is aimed at better understanding how the principle "there is no difference between code and data in LISP" works in practice. My intention was to "execute" comand-variables containing LISP code as their values (like variable "command") so that all variables which appear in this code assume local values within current lexical environment during the execution.

You can't do that, as a general rule. You're confusing symbols and variables -- they're not the same thing (except for "special" variables). Symbols are data objects used to name variables; a variable is just a memory address -- there's no way to link a symbol to an address in Lisp (you might be able to through the debugger interface, etc.), so you can't turn a symbol coming from outside into the same variable that was named by that symbol in a piece of source code. (And if you could, you'd break all sorts of things...)