NOTEQUALP

Synopsis
NOTEQUALP thing1 thing2
NOTEQUAL? thing1 thing2
thing1 <> thing2
Description

Outputs FALSE if both inputs are equal, TRUE otherwise.

Two numbers are equal if they have the same numeric value. Two non-numeric words are equal if they contain the same characters in the same order. By default, an upper case letter is equal to its corresponding lower case letter. Similarly, any two characters which are defined to be equivalent in Unicode, such as the word-final sigma (ς) and the normal sigma (σ), are also equal. However, if a variable named CASEIGNOREDP is defined and its value is not TRUE, then an upper case letter is not equal to its corresponding lower case letter; two characters are only equal if they have the same Unicode code point.

Two lists are equal if their members are equal and appear in the same order.

An array is only equal to itself; two separately created arrays are never equal even if all of their items are equal. It is important to be able to know if two expressions have the same array as their value because arrays are mutable. For example, if two different variables have the same array as their value, then running SETITEM on one of them would change both of them.

Example
SHOW 1 <> 1
false
SHOW NOTEQUALP 1 1
false
SHOW NOTEQUALP 1 2
true
SHOW NOTEQUALP [1 2 3] [1 2 3]
false
SHOW NOTEQUALP [1 2 3] [3 2 1]
true
SHOW NOTEQUALP {1 2 3} {1 2 3}
true
MAKE "myarray1 {1 2 3}
MAKE "myarray2 :myarray1
SHOW NOTEQUALP :myarray1 :myarray2
false
See Also
EQUALP

SourceForge.net Logo