boundp (AutoLISP)

 
 
 

Verifies if a value is bound to a symbol

Supported Platforms: Windows and Mac OS

Signature

(boundp sym)
sym

Type: Symbol

A symbol.

Return Values

Type: T or nil

T if sym has a value bound to it. If no value is bound to sym, or if it has been bound to nil, boundp returns nil. If sym is an undefined symbol, it is automatically created and is bound to nil.

Examples

(setq a 2 b nil)
nil

(boundp 'a)
T

(boundp 'b)
nil

The atoms-family function provides an alternative method of determining the existence of a symbol without automatically creating the symbol.