Function Entry: CADR

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

Function Entry: CADR

Name

cadr

Class

Function

Syntax

(cadr list)

Arguments and Values

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

Description

Returns the second element of list. Equivalent to (car (cdr list)). Commonly used to extract the Y coordinate from a 2D or 3D point list.

Return Values

The second element of list, or nil if list has fewer than two elements.

Side Effects

None.

Examples

  • After (setq pt2 '(5.25 1.0)), (cadr pt2) returns 1.0.
  • (cadr '(4.0)) returns nil.
  • (cadr '(5.25 1.0 3.0)) returns 1.0.

Availability

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