write_namelist_header Subroutine

private subroutine write_namelist_header(self, unit)

Write the namelist header for this instance

Type Bound

abstract_config_type

Arguments

Type IntentOptional Attributes Name
class(abstract_config_type), intent(in) :: self
integer, intent(in) :: unit

Contents

Source Code


Source Code

  subroutine write_namelist_header(self, unit)
    implicit none
    class(abstract_config_type), intent(in) :: self
    integer, intent(in) :: unit
    
    !Decide if we should include the index or not
    if(self%get_requires_index()) then
       write(unit,'("&",A,"_",I0)') trim(self%get_name()), self%index
    else
       write(unit,'("&",A)') trim(self%get_name())
    endif
  end subroutine write_namelist_header