Function Entry: CADDR

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

Function Entry: CADDR

Name

caddr

Class

Function

Syntax

(caddr list)

Arguments and Values

  • list: a list. The function expects three or more elements; with fewer elements the result is nil.

Description

Returns the third element of list. Equivalent to (car (cdr (cdr list))). Commonly used to extract the Z coordinate from a 3D point list.

Return Values

The third element of list, or nil if list has fewer than three elements.

Side Effects

None.

Examples

  • After (setq pt3 '(5.25 1.0 3.0)), (caddr pt3) returns 3.0.
  • (caddr '(5.25 1.0)) returns nil.

Availability

  • AutoCAD 2026: documented.
  • BricsCAD V26: presumed compatible.
  • Status: AutoCAD documented; BricsCAD presumed-both pending Phase 4 verification.