I think the 'olden' ways to do something like this is to pass the first element instead of the whole array and the size of the array separately:program dyn_array implicit none integer :: a(2, 3) integer :: i call set1d(a(1,1), size(a)) do i = 1, 3 write(*, '(2I4)') a(:,i) end do contains subroutine set1d(array, s) implicit none integer, intent(in) :: s integer, intent(out) :: array(s) integer :: i do i = 1, s array(i) = 3 * i end do end subroutine set1dend program dyn_array 这篇关于动态数组等级的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!