-
Notifications
You must be signed in to change notification settings - Fork 1
Greater Operator
Martin Danielsson edited this page Jul 23, 2015
·
2 revisions
The Greater
and GreaterEqual
operators compare two parameters and returns boolean true
if the first parameter is greater than (or equal to) the second parameter.
These two parameters behave differently depending on the parameters return types:
- If both parameters return an
int
value, the operation compares the values numerically - Otherwise, the operation compares the values as
string
values.
What | Type |
---|---|
Syntax | Greater[Equal](a, b) |
a |
int, string |
b |
int, string |
Return type | bool |
Examples:
-
Greater("Peter", "Paul")
returnstrue
-
Greater("Amanda", "Amanda")
returnsfalse
-
GreaterEqual("Amanda", "Amanda")
returnstrue
-
GreaterEqual(50, 70)
returnsfalse
-
Greater("99929928989238923", "Aaron")
returnsfalse
(as the values are treated asstring
s)