<< Click to Display Table of Contents >> Home mIoTa BASIC > mIoTa BASIC Language Reference > Lexical Elements > Tokens > Operators > Relational Operators |
Use relational operators to test equality or inequality of expressions. All relational operators return TRUE (1) or FALSE (0).
All relational operators associate from left to right.
Operator |
Operation |
= |
equal |
<> |
not equal |
> |
greater than |
< |
less than |
>= |
greater than or equal |
<= |
less than or equal |
For example ..
a = 2; b = 7; if a = 2 then c = 5; // 'a' is equal to 2 so 'c' is set to 5 if b < a then c = 300; // 'b' is greater than 'a' so 'c' is unchanged if b <> a then c = 60; // 'b' doesn't equal 'a' so 'c' is set to 60 |