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

/=


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

Examples

(/= 1 1)                  ; returns NIL
(/= 1 2)                  ; returns T
(/= 1 1.0)                ; returns NIL
(/= 1 2 3)                ; returns T
(/= 1 2 2)                ; returns NIL
(/= "a" "b")              ; error: bad argument type
(setq a 1) (setq b 12.4)  ; set up A and B with values
(/= a b)                  ; returns NIL

Bug:   (/= 1 2 3) returns  T  as it is supposed to, but that (/= 1 2 3 2 1) returns  T  when it should return NIL. This is only a problem for the '/=' [not-equal] function.

The bug can be reproduced with Nyquist 2.36 (in June 2007) so please take care.

See the  /=  function in the XLISP 2.0 manual.

  Back to Top


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