Function Entry: =

← Prev | ↑ Chapter | Next → | Index | Symbols

Function Entry: =

Name

=

Class

Function

Syntax

(= expr [expr ...])

Arguments and Values

  • one or more expressions of any type (see "The Comparison Operators" above).

Description

Compares its arguments for equality, each with the one to its right. Numbers compare by value across the integer/real tower ((= 1 1.0) => T); strings compare by content, case-sensitively ((= "abc" "abc") => T, (= "a" "A") => nil); any other pair compares by identity, as eq does ((= 'a 'a) => T, (= nil nil) => T).

Return Values

  • T if every adjacent pair compares equal, or with a single argument
  • nil otherwise

Side Effects

Side effects are those of evaluating the argument expressions.

Examples

  • `(= 1 1) > T ; ( 1 1.0) => T`
  • `(= "abc" "abc") > T ; ( "a" "A") => nil`
  • `(= 1 1 1) > T ; ( 1 1 2) => nil`
  • (= 1 "1") => nil — unequal, no error.
  • `(= 'a 'a) > T ; ( nil nil) > T ; ( (list 1) (list 1)) => nil`
  • `(= 'a) > T ; ()` signals an error (too few arguments).

Compatibility

Unlike eq, numbers and strings compare by value/content; unlike equal, lists compare by identity. Never signals a type error. See "The Comparison Operators , /, <, <=, >, >=" and "Function Entry: EQ" / "Function Entry: EQUAL".

Availability

  • AutoCAD 2022: measured (comparison-operators probe, 2026-09-25).
  • BricsCAD V25 / V26: measured, identical to AutoCAD.
  • Status: verified on both vendors.

Source Notes