The comparison operators have the following general meaning:
=
operator tests whether the two operands are equal<>
operator tests whether the two operands are not equal<
operator tests whether the first operand is less than the second operand>
operator tests whether the first operand is greater than the second operand<=
operator tests whether the first operand is less than or equal to the second operand>=
operator tests whether the first operand is greater than or equal to the second operandThe comparison operators are defined for the following types:
Byte
, Short
, Integer
and Long
. The operators compare the numeric values of the two integral operands.Single
and Double
. The operators compare the operands according to the rules of the IEEE 754 standard.Decimal
. The operators compare the numeric values of the two decimal operands.Only the equality (=
) and inequality (<>
) operators are defined for the following types:
Boolean
. The =
operator returns True
if both operands are True
or both operands are False
. The <>
operator returns False
if both operands are True
or both operands are False
.Char
and String
. The operators return the result of comparing the two values using either a binary comparison or a text comparison. The comparison used is determined by the compilation environment and the Option Compare directive. A binary comparison compares if the numeric Unicode value of the characters, or each character in each string, is the same. A text comparison does a Unicode text comparison based on the current culture in use on the NGWS Frameworks and Runtime. When doing a string comparison, a Nothing
value is equivalent to the string literal ""
.=
Expression |<
>
Expression |<
Expression |>
Expression |<
=
Expression |>
=
Expression