Contents | Prev | Next

8.2.4.5 Is greater than or equal

Description

When the >= operator has two numeric operands then it compares their values. If one operand is of integral type and the other is of real type then the integral operand is converted to real before the comparison is made. The result of this operation is of boolean type and is true if the left operand is greater than or equal to the right operand, and false otherwise.

When the >= operator has two numeric operands of string type then it compares the lexical ordering of the operands.

When the >= operator has two operands of set type then it tests for set inclusion. The result of this operation is true if all the members of the right operand are in the left operand, and false otherwise.

Example

For example:

   23 >=   23    results in true
  -23 >=  -23    results in true
   23 >= 23.0    results in true
 23.0 >=   23    results in true
    2 >=    3    results in false
    2 >=   -3    results in true
   -2 >=   -3    results in true
    3 >=    2    results in true
   -3 >=    2    results in false
   -3 >=   -2    results in false

and

  'abc' >= 'abc'  results in true
  'abc' >= 'abcd' results in false
  'abc' >= 'ab'   results in true
  'abc' >= 'abd'  results in false
  'abc' >= 'aac'  results in true
  'abc' >= 'b'    results in false

and

   ['a', 'b', 'c'] >= ['a']            returns true
   ['a', 'b', 'c'] >= ['a', 'b']       returns true
   ['a', 'b', 'c'] >= ['a', 'b', 'c']  returns true
   ['a']           >= ['a', 'b', 'c']  returns false
   ['a', 'b']      >= ['a', 'b', 'c']  returns false
   []              >= ['a']            return false
   ['a']           >= []               return true

Contents | Prev | Next