fill_char_vector_with_scalar Subroutine

private subroutine fill_char_vector_with_scalar(x, val, i)

Put the value in the vector and update the index (character version)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(inout), dimension(:) :: x
character(len=*), intent(in) :: val
integer, intent(inout) :: i

should be initialized to 0 before the first call


Called by

proc~~fill_char_vector_with_scalar~~CalledByGraph proc~fill_char_vector_with_scalar vector_module::fill_char_vector_with_scalar interface~fill_vector vector_module::fill_vector interface~fill_vector->proc~fill_char_vector_with_scalar proc~fill_char_vector_with_vector vector_module::fill_char_vector_with_vector interface~fill_vector->proc~fill_char_vector_with_vector proc~fill_vector_with_vector vector_module::fill_vector_with_vector interface~fill_vector->proc~fill_vector_with_vector proc~fill_char_vector_with_vector->interface~fill_vector proc~fill_vector_with_vector->interface~fill_vector

Source Code

    subroutine fill_char_vector_with_scalar(x, val, i)

    implicit none

    character(len=*),dimension(:),intent(inout) :: x
    character(len=*),intent(in) :: val
    integer,intent(inout) :: i !! should be initialized to 0 before the first call

    i = i + 1
    if (i>size(x)) error stop 'error in fill_vector: x is not large enough.'
    x(i) = val

    end subroutine fill_char_vector_with_scalar