check_index Subroutine

private subroutine check_index(i, n, str)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: i
integer, intent(in) :: n
character(len=*), intent(in) :: str

Contents

Source Code


Source Code

subroutine check_index(i,n,str)
integer, intent(in) :: i, n
character(len=*), intent(in) :: str

call assert( (i <=  n), "Index overflow in "//trim(str))
call assert( (i >  0), "Non-positive index in "//trim(str))
end subroutine check_index