assign_section Subroutine

private elemental subroutine assign_section(lhs, rhs)

Assignment between two sections.

Arguments

TypeIntentOptionalAttributesName
class(section), intent(inout) :: lhs

Left hand side.

type(section), intent(in) :: rhs

Rigth hand side.


Contents

Source Code


Source Code

  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