Operator
Greater than or equal
Description
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 |
Returns True if expression1 is larger than or equal to expression2. |
|
expression1 |
Any alphabetic or quantitative expression. |
|
expression2 |
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 String.Compare 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 Not TextField1.Text.IsEmpty And Not TextField2.Text.IsEmpty Then
a = TextField1.Text.Val
b = TextField2.Text.Val
If a >= b Then
MessageBox("A is greater than or equal to B!")
Else
System.Beep
End If
Else
MessageBox("Please enter values into both boxes!")
End If
Compatibility
All project types on all supported operating systems.
See also
>, <=, <, =, <>, Mod operator; Operator Compare, String.Compare function; Operator precedence.