Greater equal than to string logical operator.
type(string) :: astring
type(string) :: anotherstring
logical :: test_passed(3)
astring = 'one'
anotherstring = 'ONE'
test_passed(1) = ((astring>=anotherstring).eqv..true.)
astring = 'ONE'
anotherstring = 'one'
test_passed(2) = ((astring>=anotherstring).eqv..false.)
astring = 'ONE'
anotherstring = 'ONE'
test_passed(3) = ((astring>=anotherstring).eqv..true.)
print '(L1)', all(test_passed)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs |
Left hand side. |
||
type(string), | intent(in) | :: | rhs |
Right hand side. |
Opreator test result.
elemental function string_ge_string(lhs, rhs) result(is_it)
!< Greater equal than to string logical operator.
!<
!<```fortran
!< type(string) :: astring
!< type(string) :: anotherstring
!< logical :: test_passed(3)
!< astring = 'one'
!< anotherstring = 'ONE'
!< test_passed(1) = ((astring>=anotherstring).eqv..true.)
!< astring = 'ONE'
!< anotherstring = 'one'
!< test_passed(2) = ((astring>=anotherstring).eqv..false.)
!< astring = 'ONE'
!< anotherstring = 'ONE'
!< test_passed(3) = ((astring>=anotherstring).eqv..true.)
!< 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_ge_string