list (AutoLISP)

Takes any number of expressions and combines them into one list

Supported Platforms: Windows and Mac OS

Signature

(list [expr ...])
expr

Type: Integer, Real, String, List, Ename (entity name), T, or nil

An AutoLISP expression.

Return Values

Type: List or nil

A list, unless no expressions are supplied, in which case list returns nil.

Remarks

This function is frequently used to define a 2D or 3D point variable (a list of two or three reals).

Examples

(list 'a 'b 'c)
(A B C)

(list 'a '(b c) 'd)
(A (B C) D)

(list 3.9 6.7)
(3.9 6.7)

As an alternative to using the list function, you can explicitly quote a list with the quote function if there are no variables or undefined items in the list. The single quote character (') is defined as the quote function.

'(3.9 6.7) means the same as (list 3.9 6.7)

This can be useful for creating association lists and defining points.