Help Center›FreeBASIC
Operator >= (Greater Than Or Equal)operator
Compares an expression greater than or equal to another expression
Syntax
Declare Operator >= ( ByRef lhs As Byte, ByRef rhs As Byte ) As Integer
Declare Operator >= ( ByRef lhs As UByte, ByRef rhs As UByte ) As Integer
Declare Operator >= ( ByRef lhs As Short, ByRef rhs As Short ) As Integer
Declare Operator >= ( ByRef lhs As UShort, ByRef rhs As UShort ) As Integer
Declare Operator >= ( ByRef lhs As Integer, ByRef rhs As Integer ) As Integer
Declare Operator >= ( ByRef lhs As UInteger, ByRef rhs As UInteger ) As Integer
Declare Operator >= ( ByRef lhs As LongInt, ByRef rhs As LongInt ) As Integer
Declare Operator >= ( ByRef lhs As ULongInt, ByRef rhs As ULongInt ) As Integer
Parameters
| Name | Description | |
|---|---|---|
lhs | The left-hand side expression to compare to. | |
rhs | The right-hand side expression to compare to. | |
T | Any pointer type. |
Return value
Returns negative one (-1) if the left-hand side expression is greater than or equal to the right-hand side expression, or zero (0) if less than.
Description
Operator >= (Greater than or Equal) is a binary operator that compares an expression greater than or equal to another expression and returns the result - a boolean value in the form of an Integer: negative one (-1) for true and zero (0) for false. The arguments are not modified in any way.When this operator is applied to string type data, then a lexicographic/alphabetic order comparison is performed (ordered from the numeric ASCII values of the characters of the two strings).
This operator can be overloaded to accept user-defined types as well.
Remarks
Usage
result = lhs >= rhs
Dialect Differences
- In the -lang qb dialect, this operator cannot be overloaded.
Differences from QB
- none
See also
-
Operator <(Less than)
Example
Operator < (Less than) is complement to Operator >= (Greater than or Equal), and is functionally identical when combined with Operator Not (Bit-wise Complement).If (420 >= 69) Then Print "(420 >= 69) is true."
If Not (420 < 69) Then Print "not (420 < 69) is true."
Reference
- Documented in KeyPgOpGreaterThanOrEqual.html