Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | |||
type(string), | intent(in) | :: | rhs |
elemental function string_eq_string(lhs, rhs) result(is_it) !< Equal to string logical operator. !< !<```fortran !< type(string) :: astring !< type(string) :: anotherstring !< logical :: test_passed(2) !< astring = ' one ' !< anotherstring = 'two' !< test_passed(1) = ((astring==anotherstring).eqv..false.) !< astring = 'the same ' !< anotherstring = 'the same ' !< test_passed(2) = ((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_eq_string