numberp

AutoCad AutoLISP Functions

 
numberp
 
 
 

Verifies that an item is a real number or an integer

(numberp item)

Arguments

item

An AutoLISP expression.

Return Values

T if item evaluates to a real or an integer; otherwise nil.

Examples

Command: (setq a 123 b 'a)

A

Command: (numberp 4)

T

Command: (numberp 3.8348)

T

Command: (numberp "Howdy")

nil

Command: (numberp a)

T

Command: (numberp b)

nil

Command: (numberp (eval b))

T