eq
From AutoCad AutoLISP Functions
Determines whether two expressions are identical
(eq expr1 expr2)
The eq function determines whether expr1 and expr2 are bound to the same object (by setq, for example).
T if the two expressions are identical; otherwise nil.
Given the following assignments:
(setq f1 '(a b c))
(setq f2 '(a b c))
(setq f3 f2)
Command: (eq f1 f3)
nil
eq returns nil because f1 and f3, while containing the same value, do not refer to the same list.
Command: (eq f3 f2)
T
eq returns T because f3 and f2 refer to the same list.
See Also
-
The = (equal to) and equal functions.