Operator

# Greater than or equal

<div class="rst-class">

forsearch

</div>

Operator

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

Used to determine whether one alphabetic or quantitative expression is <span class="title-ref">Greater than or equal</span> to another. `String</api/data_types/string>` comparisons are case-insensitive.

## Usage

``` xojo
result = expression1 >= expression2
```

| Part        | Type                                                                             | Description                                                                                   |
|-------------|----------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------|
| result      | `Boolean</api/data_types/boolean>`                                               | Returns `True</api/language/true>` if *expression1* is larger than or equal to *expression2*. |
| expression1 | `String</api/data_types/string>`, Number or `DateTime</api/data_types/datetime>` | Any alphabetic or quantitative expression.                                                    |
| expression2 | `String</api/data_types/string>`, Number or `DateTime</api/data_types/datetime>` | 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<string.compare>` to do a case-sensitive `string</api/data_types/string>` comparison.

You can use `Operator Compare</api/language/operators/operator_overloads/operator_compare>` to define comparisons for classes.

## Sample code

The following example tests whether one number is <span class="title-ref">Greater than or equal</span> to another.

``` xojo
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

|                       |     |
|-----------------------|-----|
| **Project Types**     | All |
| **Operating Systems** | All |

<div class="seealso">

`\></api/language/operators/comparison/greater_than>`, `\<=</api/language/operators/comparison/less_than_or_equal>`, `<</api/language/operators/comparison/less_than>`, `=</api/language/operators/comparison/equals_operator>`, `<></api/language/operators/comparison/not_equal>`, `Mod</api/language/operators/mathematical/mod>` operator; `Operator Compare</api/language/operators/operator_overloads/operator_compare>`, `String.Compare<string.compare>` function; `Operator precedence</api/language/operators/operator_precedence>`.

</div>
