!=, <> and >< Inequality Operators

Purpose

An inequality operator returns false if its operands are equal, true otherwise.

Syntax

? = exp1 != exp2

? = exp1 <> exp2

? = exp1 >< exp2

exp1, exp2: aexp

Description

For primitive and value types, an inequality operator will return true if the values of its operands are different, false otherwise. For the String type, it compares the values of the strings and returns false if they are identical (see Mode Compare for more information on comparing strings).

Example

OpenW # 1

Global Int32 i = 32, b = 30

Print b != i               // Prints True

i = 30

Print b <> i               // Prints False

Print (2 <> 1) != (2 >< 2) // Prints True

Do

Sleep

Until Win_1 Is Nothing

Remarks

The <>, >< and != operators are synonymous, the former coming from classic BASIC, the latter from C.

See Also

<, >, =<, <=, >=, =>, =, ==, Operator Hierarchy

{Created by Sjouke Hamstra; Last updated: 17/09/2014 by James Gaite}