Operators: !=
Inequality operator.
Syntax
operand!=operand
rect‑operand!=point‑operandorpoint‑operand!=rect‑operand
Is not equal check
In its first version, the != operator checks whether the value of the left operand is equal to the value of the right operand. If yes, the operation results in the boolean value false. Otherwise, the operation will result in the value true. This operator can be used with all Chora data types provided that the data type of the left operand does match the type of the right operand. Two operands are equal, when their values are binary identical. This means in particular, that string or char operands are always compared case sensitive. For example:
var string s1 = "hello world"; var string s2 = "hello world"; var string s3 = "HELLO WORLD"; var rect r1 = <100,200,110,220>; var rect r2 = <100,200,110,220>; var rect r3 = <101,200,110,220>; var object o1 = SomeTextView; var object o2 = SomeTextView; var object o3 = OtherTextView; var bool result = s1 != s2; // result = false var bool result = s1 != s3; // result = true var bool result = r1 != r2; // result = false var bool result = r1 != r3; // result = true var bool result = o1 != o2; // result = false var bool result = o1 != o3; // result = true
Is not point in rectangle check
In its second version, the != operator checks whether the position specified in the point operand does lie within the area of the rect operand. If yes, the operation results in the boolean value false. Otherwise, the operation will result in the value true. For example:
var rect a = <0,0,100,200>; var point b = <10,20>; var point c = <200,300>; var bool result = a != b; // result = false var bool result = a != c; // result = true