XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next

integerp


Type:   -   predicate function (subr)
Source:   -   xlbfun.c

Syntax

(integerp expr)
expr - the expression to check
returns -  T  if the value is an integer, NIL otherwise

Description

The 'integerp' predicate function checks if an 'expr' is a integer number.  T  is returned if 'expr' is a integer number, NIL is returned otherwise.

Examples

(integerp 1)         ; returns T - integer
(integerp #x034)     ; returns T - integer readmacro
(integerp '1)        ; returns T - still an integer
(setq a 14)
(integerp a)         ; returns T - evaluates to int.
(integerp 0)         ; returns T - integer zero

(integerp 1.2)       ; returns NIL - float
(integerp 0.0)       ; returns NIL - float zero
(integerp 'a)        ; returns NIL - symbol
(integerp #\a)       ; returns NIL - character
(integerp NIL)       ; returns NIL - NIL
(integerp #(0 1 2))  ; returns NIL - array

See the integerp predicate function in the XLISP 2.0 manual.

  Back to Top


XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next