numberp (AutoLISP)

Verifies that an item is a real number or an integer

Supported Platforms: Windows and Mac OS

Signature

(numberp item)
item

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

An AutoLISP expression.

Return Values

Type: T or nil

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

Examples

(setq a 123 b 'a)
A

(numberp 4)
T

(numberp 3.8348)
T

(numberp "Howdy")
nil

(numberp a)
T

(numberp b)
nil

(numberp (eval b))
T