Assignment between two sections.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(section), | intent(inout) | :: | lhs | Left hand side. |
||
type(section), | intent(in) | :: | rhs | Rigth hand side. |
elemental subroutine assign_section(lhs, rhs)
!< Assignment between two sections.
class(section), intent(INOUT):: lhs !< Left hand side.
type(section), intent(IN):: rhs !< Rigth hand side.
if (allocated(rhs%sname)) lhs%sname = rhs%sname
if (allocated(rhs%options)) then
if (allocated(lhs%options)) deallocate(lhs%options) ; allocate(lhs%options(1:size(rhs%options, dim=1)))
lhs%options = rhs%options
endif
endsubroutine assign_section