Function Entry: EQ
← Prev | ↑ Chapter | Next → | Index | Symbols
Function Entry: EQ
Name
eq
Class
Function
Syntax
(eq expr1 expr2)
Arguments and Values
expr1,expr2: integer, real, string, list, ename, T, or nil.
Description
Determines whether two expressions are identical — that is, whether both arguments reference the same object in memory, not merely equivalent values. For lists this is object identity; two structurally equal but distinct lists are not eq.
Return Values
Returns T when the expressions reference identical objects, otherwise nil.
Side Effects
None.
Examples
Given (setq f1 '(a b c)), (setq f2 '(a b c)), (setq f3 f2):
(eq f1 f3)returns nil —f1andf3denote distinct list objects, even though they are structurally equal.(eq f3 f2)returns T —f3andf2refer to the same list object.
Availability
- AutoCAD 2026: documented.
- BricsCAD V26: presumed compatible (no contradicting page found).
- Status: AutoCAD documented; BricsCAD presumed-both pending Phase 4 verification.
Source Notes
- [eq (AutoLISP 2026)](https://help.autodesk.com/cloudhelp/2026/ENU/AutoCAD-AutoLISP-Reference/files/GUID-BC81B391-48BF-401E-80D0-05A1B578A0FF.htm)
- Status: documented (Phase 3 body fill).