|
Less
, Less Than and Not Equal Operator(<=, < >
or <)
These
operators are used to compare two expressions. The less
than or equal operator checks for whether any one expression
is less or equal to the other.
Syntax
:
expression 1 < = expression 2
Example
:
on (press)
{
x=5 ; y = 10
trace (number(x) <= number (y) )
}
The
output window will show which number is less(i.e. true).
It will return only Boolean value.
Inequality
( < >)
This
operator checks exactly opposite for equality. If the
expressions are not equal, then it will return true.
Syntax
:
expression 1 < > expression 2
Example
:
a = 2;
b = 3;
trace (a< >b);
The
output will show (that a< >b) a Boolean value.
Less
than (<)
This
operator will check whether expression 1 is less than
expression 2
Syntax
:
expr 1 < expr 2
Example
:
a = 2;
b = 1;
trace (a >b);
The
output window shows "false".
|