Nyquist / XLISP 2.0  -  Contents | Tutorials | Examples | Reference

<


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

Syntax

(< expr1 expr2 ...)
exprN - a numeric expression
returns -  T  if the results of comparing the expressions are all true, NIL otherwise

Description

The '<' [less-than] function takes an arbitrary number of numeric arguments. It checks to see if all the numbers are monotonically increasing.  T  is returned if the arguments are numerically, and monotonically increasing, NIL is returned otherwise. In the case of two arguments, this has the effect of testing if 'expr1' is less than 'expr2'.

Examples

(< 1 2)              => T
(< 1 1)              => NIL
(< -1.5 -1.4)        => T
(< 1 2 3 4)          => T
(< 1 2 3 2)          => NIL
(< "a" "b")          => error: bad argument type
(setq a 12 b 13.99)  => 13.99  ; set up A and B with values
(< a b)              => T
(< b a)              => NIL

See setq.

See also:

  Back to Top


Nyquist / XLISP 2.0  -  Contents | Tutorials | Examples | Reference