HP Fortran Programmer's Reference (September 2007)

Intrinsic procedures
Intrinsic procedure speciļ¬cations
Chapter 11 581
Result type/
type parameters
Default logical.
Result value
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.
If either string contains a character not in the ASCII character set, the result is processor
dependent.
The result is .TRUE. if the strings are equal or if STRING_A follows STRING_B in the ASCII
collating sequence; otherwise, the result is .FALSE. Note that the result is .TRUE. if both
STRING_A and STRING_B are of zero length.
LGT(STRING_A, STRING_B)
Description
Tests whether a string is lexically greater than another string, based on the ASCII collating
sequence.
Class
Elemental function.
Arguments
STRING_A must be of type default character.
STRING_B must be of type default character.
Result type/
type parameters
Default logical.
Result value
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.
If either string contains a character not in the ASCII character set, the result is
processor-dependent.