Comparison Operators (Functions/Subroutines/Programs)
Created at 15 MAY 1996 03:46PM
Description Use comparison operators to compare to values or expressions.
Syntax expression operator expression
Remarks The following table describes the available comparison operators in Basic+:
Operator | Description |
= or EQ | Equal |
# or NE | Not equal |
< or LT | Less than |
⇐ or LE | Less than or equal |
> or GT | Greater than |
>= or GE | Greater than or equal |
_EQC | Equal, case-insensitive |
_NEC | Not equal, case-insensitive |
_LTC | Less than, case-insensitive |
_LEC | Less than or equal, case-insensitive |
_GTC | Greater than, case-insensitive |
_GEC | Greater than or equal, case-insensitive |
MATCH or MATCHES | Tests if the expression on the left matches the pattern on the right |
Return value All comparison operations result in a boolean value of either 1 (true) or 0 (false).
See Also If statement, Loop statement, MATCHES operator
Example
if "hello" _NEC "HELLO" then
Msg(@window, "There is something very wrong")
end