Function Entry: VL-LIST-LENGTH
← Prev | ↑ Chapter | Next → | Index | Symbols
Function Entry: VL-LIST-LENGTH
Name
vl-list-length
Class
Visual LISP List Function
Syntax
(vl-list-length list-or-cons-object)
Arguments and Values
list-or-cons-object: a true (proper) list, a dotted (improper) list, or nil.
Description
Returns the length of a true list. Unlike Common Lisp's length, which signals an error on a dotted list, vl-list-length returns nil for a dotted list, providing graceful handling of malformed list structures.
Return Values
An integer for proper lists; nil for dotted lists.
Side Effects
None.
Examples
(vl-list-length nil)returns0.(vl-list-length '(1 2))returns2.(vl-list-length '(1 2 . 3))returns nil.
Availability
- AutoCAD 2026: documented.
- BricsCAD V26: presumed compatible.
- Status: AutoCAD documented; BricsCAD presumed-both pending Phase 4 verification.
Source Notes
- [vl-list-length (AutoLISP 2026)](https://help.autodesk.com/cloudhelp/2026/ENU/AutoCAD-AutoLISP-Reference/files/GUID-5BAF3505-B1E9-49BF-9202-AAD36043B6D3.htm)
- Status: documented (Phase 3 body fill).