Function Entry: EQUAL
← Prev | ↑ Chapter | Next → | Index | Symbols
Function Entry: EQUAL
Name
equal
Class
Function
Syntax
(equal expr1 expr2 [fuzz])
Arguments and Values
expr1,expr2: integer, real, string, list, ename, T, or nil.fuzz(optional): integer or real tolerance value used for inexact numeric comparison.
Description
Determines whether two expressions evaluate to the same value. Unlike eq, equal compares structurally: two distinct but element-wise equal lists are equal. The optional fuzz argument controls tolerance for real-number comparison and for lists of reals such as point coordinates; two reals computed by different methods can differ slightly, and fuzz lets such values compare equal when the absolute difference is within tolerance.
Return Values
Returns T if the expressions are equal under the rules above, otherwise nil.
Side Effects
None.
Examples
- Structural equality on lists:
(equal '(a b c) '(a b c))returns T. - Numeric tolerance: with
(setq a 1.123456)and(setq b 1.123457),(equal a b)returns nil, while(equal a b 0.000001)returns T.
Availability
- AutoCAD 2026: documented.
- BricsCAD V26: presumed compatible (no contradicting page found).
- Status: AutoCAD documented; BricsCAD presumed-both pending Phase 4 verification.
Source Notes
- [equal (AutoLISP 2026)](https://help.autodesk.com/cloudhelp/2026/ENU/AutoCAD-AutoLISP-Reference/files/GUID-7E85CB8F-B4DA-42F3-ABD3-89342A11EF9B.htm)
- Status: documented (Phase 3 body fill).