1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| program f
implicit none
integer, dimension(6) :: t1, t2, t3
integer :: dim
data t1 / 8,2,3,4,5,1 /
data t2 / 8,3,2,5,5,7 /
! Tu n'es pas obligé de récupérer dim, c'est toi qui voit si tu en as besoin
call cf (t1, t2, t3, dim)
print *, t3(1), t3(2), dim
end program f
subroutine cf (t1, t2, t3, dim)
implicit none
integer, dimension(*), intent(in) :: t1, t2
integer, dimension(*), intent(out) :: t3
integer, intent(out) :: dim
t3(1) = 8
t3(2) = 5
dim = 2
end subroutine cf |
Partager