Special Form Entry: SET

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

Special Form Entry: SET

Name

set

Class

Function-like assignment operator

Syntax

(set sym expr)

Arguments and Values

  • sym: an expression whose value designates a symbol
  • expr: an expression

Description

Assigns a value to the symbol designated by the first argument.

Return Values

Returns the assigned value.

Side Effects

Changes the binding of the designated symbol.

Exceptional Situations

Erroneous if the first evaluated argument does not designate a valid assignable symbol.

Examples

  • (set 'A 3) => 3

Compatibility

Stable across vendors.

Notes

Unlike setq, the symbol argument is evaluated.

Availability

  • AutoCAD 2026: documented (per Autodesk reference page).
  • BricsCAD V26: presumed compatible (no contradicting page found).
  • Status: AutoCAD documented; BricsCAD presumed-both pending Phase 4 verification.