string_gt_string Function

private elemental function string_gt_string(lhs, rhs) result(is_it)

Arguments

TypeIntentOptionalAttributesName
class(string), intent(in) :: lhs
type(string), intent(in) :: rhs

Return Value logical


Contents

Source Code


Source Code

   elemental function string_gt_string(lhs, rhs) result(is_it)
   !< Greater than to string logical operator.
   !<
   !<```fortran
   !< type(string) :: astring
   !< type(string) :: anotherstring
   !< logical      :: test_passed(2)
   !< astring = 'one'
   !< anotherstring = 'ONE'
   !< test_passed(1) = ((astring>anotherstring).eqv..true.)
   !< astring = 'ONE'
   !< anotherstring = 'one'
   !< test_passed(2) = ((astring>anotherstring).eqv..false.)
   !< print '(L1)', all(test_passed)
   !<```
   !=> T <<<
   class(string), intent(in) :: lhs   !< Left hand side.
   type(string),  intent(in) :: rhs   !< Right hand side.
   logical                   :: is_it !< Opreator test result.

   is_it = lhs%raw > rhs%raw
   endfunction string_gt_string