Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self |
elemental function is_allocated(self) !< Return true if the string is allocated. !< !<```fortran !< type(string) :: astring !< logical :: test_passed(2) !< test_passed(1) = astring%is_allocated().eqv..false. !< astring = 'hello' !< test_passed(2) = astring%is_allocated().eqv..true. !< print '(L1)', all(test_passed) !<``` !=> T <<< class(string), intent(in) :: self !< The string. logical :: is_allocated !< Result of the test. is_allocated = allocated(self%raw) endfunction is_allocated