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 nilf1 and f3 denote distinct list objects, even though they are structurally equal.
  • (eq f3 f2) returns Tf3 and f2 refer 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.