boundp

AutoCad AutoLISP Functions

 
boundp
 
 
 

Verifies if a value is bound to a symbol

(boundp sym) 

Arguments

sym

A symbol.

Return Values

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

Command: (setq a 2 b nil)

nil

Command: (boundp 'a)

T

Command: (boundp 'b)

nil

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

See Also