I mean why something like this won't work:
(eval (read "command \"" _.CIRCLE "\" \"" _non "\" (getpoint) 50"))
(eval '(command \"" _.CIRCLE "\" \"" _non "\" (getpoint) 50))
(eval "command \"" _.CIRCLE "\" \"" _non "\" (getpoint) 50")
Addressing each of your examples in turn:
For your first example:
(eval (read "command \"" _.CIRCLE
"\" \"" _non
"\" (getpoint) 50"))
Given that
read accepts only a single string argument and your expression consists of several separate symbols & strings, I will assume you that you actually mean:
(eval (read "command \"_.CIRCLE\" \"_non\" (getpoint) 50"))
Since the
read function will return the first valid AutoLISP expression found in a string, this will return the
command function:
_$
(read "command \"_.CIRCLE\" \"_non\" (getpoint) 50")
Which, when evaluated, will yield the function pointer:
_$
(eval (read "command \"_.CIRCLE\" \"_non\" (getpoint) 50"))#<SUBR @000000002b2ed6d8 COMMAND>
For your second example:
(eval '
(command \
"" _.CIRCLE
"\" \"" _non
"\" (getpoint) 50))
Again, this contains invalid syntax, so I'll assume you actually mean:
This will evaluate, exhibiting the same behaviour as:
As
eval is simply evaluating the quoted literal expression - see
here for more information.
For your third example:
(eval "command \"" _.CIRCLE
"\" \"" _non
"\" (getpoint) 50")
Again, this contains invalid syntax as the
eval function can only accept a single argument, so I'll assume you mean:
(eval "command \"_.CIRCLE\" \"_non\" (getpoint) 50")
Since this is merely a literal string, this will be evaluated to give the same string data:
_$
(eval "command \"_.CIRCLE\" \"_non\" (getpoint) 50")"command \"_.CIRCLE\" \"_non\" (getpoint) 50"
Aside, are you using a code editor (such as the Visual LISP IDE) to write your code?
As if so, the code highlighting present in most code editors would enable you to easily spot the syntax errors described above.