Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

LGE

Elemental Intrinsic Function (Generic): Determines if a string is lexically greater than or equal to another string, based on the ASCII collating sequence, even if the processor's default collating sequence is different. In Intel® Fortran, LGE is equivalent to the (.GE.) operator.

result = LGE (string_a,string_b)

string_a

(Input) Must be of type character.

string_b

(Input) Must be of type character.

Results

The result type is default logical. If the strings are of unequal length, the comparison is made as if the shorter string were extended on the right with blanks, to the length of the longer string.

The result is true if the strings are equal, both strings are of zero length, or if string_a follows string_b in the ASCII collating sequence; otherwise, the result is false.

Specific Name

Argument Type

Result Type

LGE 1,2

CHARACTER

LOGICAL(4)

1 This specific function cannot be passed as an actual argument.

2The setting of compiler options specifying integer size can affect this function.

Example

LGE ( 'ONE', 'SIX' ) has the value false.

LGE ( 'TWO', 'THREE' ) has the value true.

The following shows another example:

LOGICAL L
L = LGE('ABC','ABD')       ! returns .FALSE.
L = LGE ('AB', 'AAAAAAAB') ! returns .TRUE.