The LLT function tests whether a string is lexically less than another string based on the ordering of the ASCII collating sequence.
SyntaxLLT (string_a, string_b)
string_a is an INTENT(IN) scalar or array of type CHARACTER.
string_b is an INTENT(IN) scalar or array of type CHARACTER.
If string_a and string_b are both arrays, they must have the same shape.
The result is of type default LOGICAL.
Its value is true if string_a precedes string_b in the ASCII collating sequence; otherwise the result is false.
Trailing blanks are ignored.
If both strings are of zero length the result is false.
Examplecharacter(len=3) :: a="abc",b="ABC" character(len=0) :: a1,b1 character(len=5) :: c1(2)=(/"abc ","123 "/) character(len=5) :: c2(2)=(/"CBA "," 123"/) write(*,*) llt(a,b) ! writes F write(*,*) llt(a,c1) ! writes F F write(*,*) llt(c2,a) ! writes T T write(*,*) llt(c1,c2) ! writes F F