Sets the value of a symbol or symbols to associated expressions
(setq sym expr [sym expr]...)
setq function can assign multiple symbols in one call to the function.
This is the basic assignment function in AutoLISP. TheArguments
A symbol. This argument is not evaluated.
An expression.
Return Values
The result of the last expr evaluated.
Examples
a to 5.0:
The following function call sets variableCommand: (setq a 5.0)
5.0
a is evaluated, it returns the real number 5.0.
Wheneverb and c:
The following command sets two variables,Command: (setq b 123 c 4.7)
4.7
setq returns the value of the last variable set.
s is set to a string:
In the following example,Command: (setq s "it")
"it"
x:
The following example assigns a list toCommand: (setq x '(a b))
(A B)
AutoLISP Variables topic in the AutoLISP Developer's Guide .
The