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 '=' [equality] function takes an arbitrary number of numeric arguments. It checks to see if all the numbers are equal.  T  is returned if all of the arguments are numerically equal to each other, NIL is returned otherwise.

Examples

(= 1 1)              => T
(= 1 2)              => NIL
(= 1 1.0)            => T
(= 1 1.0 1 (+ 0 1))  => T
(= 1 1.0 1.00001)    => NIL
(= "a" "b")          => error: bad argument type
(setq a 1 b 1.0)     => 1.0  ; set up A and B with values
(= a b)              => T

See setq.

See also:

  Back to Top


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