Function-Handling Functions Reference (AutoLISP)

The following table provides summary descriptions of the AutoLISP function-handling functions.

Function-handling functions

Platforms

Windows

Mac OS

Web

Function

Description

AutoCAD AutoCAD LT AutoCAD AutoCAD LT AutoCAD

(apply function lst)

Passes a list of arguments to a specified function

✓ ✓ ✓ -- ✓

(defun sym ([arguments] [/variables ...]) expr ... )

Defines a function

✓ ✓ ✓ -- ✓

(defun-q sym ([arguments] [/ variables ...]) expr ...)

Defines a function as a list (intended for backward-compatibility only)

✓ ✓ ✓ -- ✓

(defun-q-list-ref 'function)

Displays the list structure of a function defined with defun-q

✓ ✓ ✓ -- ✓

(defun-q-list-set 'sym list)

Defines a function as a list (intended for backward-compatibility only)

✓ ✓ ✓ -- ✓

(eval expr)

Returns the result of evaluating an AutoLISP expression

✓ ✓ ✓ -- ✓

(lambda arguments expr ...)

Defines an anonymous function

✓ ✓ ✓ -- ✓

(progn [expr ...])

Evaluates each expression sequentially, and returns the value of the last expression

✓ ✓ ✓ -- ✓

(trace function ...)

Aids in AutoLISP debugging

✓ ✓ ✓ -- ✓

(untrace function ...)

Clears the trace flag for the specified functions

✓ ✓ ✓ -- ✓