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

plusp


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

Syntax

(plusp expr)
expr - the numeric expression to check
returns -  T  if the number is positive, NIL otherwise

Description

The 'plusp' predicate function checks to see if the number 'expr' is positive.  T  is returned if the number is positive (greater than 0), NIL is returned otherwise.

An error is generated if the 'expr' is not a numeric expression:

error: bad argument type

Examples

(plusp 0)            ; returns NIL
(plusp 1)            ; returns T
(plusp -1)           ; returns NIL
(plusp #xFFFFFFFF)   ; returns NIL
(plusp #x0FFFFFFF)   ; returns T

(plusp 'a)           ; error: bad argument type
(setq a 4)           ; set value of A to 4
(plusp a)            ; returns T

See the plusp predicate function in the XLISP 2.0 manual.

  Back to Top


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