Allocate (prepare for filling) dynamic memory of attributes.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(xml_tag), | intent(inout) | :: | self |
XML tag. |
||
integer(kind=I4P), | intent(in) | :: | Na |
Number of attributes. |
elemental subroutine alloc_attributes(self, Na) !< Allocate (prepare for filling) dynamic memory of attributes. class(xml_tag), intent(inout) :: self !< XML tag. integer(I4P), intent(in) :: Na !< Number of attributes. if (allocated(self%attribute)) then call self%attribute%free deallocate(self%attribute) endif allocate(self%attribute(1:2, 1:Na)) self%attributes_number = Na endsubroutine alloc_attributes