Greater than or equal

From Xojo Documentation

(Redirected from Greater than=)
Operator

Used to determine whether one alphabetic or quantitative expression is greater than or equal to another. String comparisons are case-insensitive.

Usage

result = expression1 >= expression2

Part Type Description
result Boolean Returns True if expression1 is larger than or equal to expression2.
expression1 String, Number or Date Any alphabetic or quantitative expression.
expression2 String, Number or Date Any alphabetic or quantitative expression.

Notes

The data types of expression1 and expression2 must match.

A string is "greater than" another string if it is first when the two strings are sorted alphabetically. Use StrComp to do a case-sensitive string comparison.

You can use Operator_Compare to define comparisons for classes.

Sample Code

The following example tests whether one number is greater than or equal to another.

Var a, b As Integer
If TextField1.Value <> "" And TextField2.Value <> "" Then
a = Val(TextField1.Value)
b = Val(TextField2.Value)
If a >= b Then
MessageBox("A is greater than or equal to B!")
Else
Beep
End If
Else
MessageBox("Please enter values into both boxes!")
End If

See Also

>, <=, <, =, <>, Mod and StrComp operators; Operator_Compare function; Operator precedence.