init_ga2d_char Subroutine

public subroutine init_ga2d_char(me, width, length)

Arguments

Type IntentOptional Attributes Name
type(grw_char2darray_type), intent(out) :: me

dynamic array to init

integer, intent(in) :: width

width of the container

integer, intent(in), optional :: length

initial length of the container


Called by

proc~~init_ga2d_char~~CalledByGraph proc~init_ga2d_char init_ga2d_char interface~init~16 init interface~init~16->proc~init_ga2d_char

Source Code

  subroutine init_ga2d_char(me, width, length)
    ! --------------------------------------------------------------------------
    !> dynamic array to init
    type(grw_char2darray_type), intent(out) :: me
    !> width of the container
    integer, intent(in)           :: width
    !> initial length of the container
    integer, intent(in), optional :: length
    ! --------------------------------------------------------------------------

    me%containerwidth = width
    if (present(length)) me%containersize = length

    allocate(me%val(me%containerwidth,me%containersize))
    ! reset all values (only positive values are valid)
    me%val(:,:) = ''
    me%nvals = 0

  end subroutine init_ga2d_char