Function Entry: =
← Prev | ↑ Chapter | Next → | Index | Symbols
Function Entry: =
Name
=
Class
Function
Syntax
(= expr [expr ...])
Arguments and Values
- one or more expressions, each a number or a string (see "The Comparison Operators" domain rule above); not restricted to numbers.
Description
Compares its arguments for equality. Numbers compare by value across the integer/real tower ((= 1 1.0) => T); strings compare by content ((= "abc" "abc") => T). Unlike eq~/~equal, which accept any type, = is restricted to numbers and strings.
Return Values
- T if all arguments compare equal
- nil otherwise, or if any argument is nil (bottom propagation)
Side Effects
Side effects are those of evaluating the argument expressions.
Examples
(= 1 1) => T(= 1 1.0) => T— cross-type numeric equality.(= "abc" "abc") => T— strings compared by content.- `(= 1 1 1)
> T1 1 2) => nil`;( (= 1 nil) => nil— no error (⊥ propagation).(= 1 "1")signals a type error — two incompatible non-nil types.
Compatibility
A general equality predicate over numbers and strings, more restrictive than eq~/~equal (which accept any type). Cross-type non-nil arguments (number vs string) signal a type error; a nil argument yields nil without error. See "The Comparison Operators , /, <, <=, >, >=" and "Function Entry: EQ" / "Function Entry: EQUAL".
Availability
- AutoCAD 2026: documented (per Autodesk reference page).
- BricsCAD V26: documented; string comparison verified by direct probe.
- Status: string-comparison domain confirmed on BricsCAD V26; numeric-tower coercion per chapter 8.
Source Notes
- [Non-alphabetic Functions Reference (AutoLISP)](https://help.autodesk.com/cloudhelp/2026/KOR/AutoCAD-LT-AutoLISP-Reference/files/GUID-EBDC1072-48BF-4204-80B1-73430DBF58E1.htm)
- [Equality and Conditional Functions Reference (AutoLISP)](https://help.autodesk.com/cloudhelp/2023/ENU/AutoCAD-AutoLISP-Reference/files/GUID-C6A7FC58-7A07-4650-9D59-12CAFD194FDA.htm)
- Status: documented; numbers-and-strings domain confirmed (BricsCAD V26 probe).