我想知道intent(in)通過與相應實際引數關聯的指標修改虛擬引數是否合法/安全。特別是在子程式呼叫之前建立指標關聯時。
例如,以下是否可以(它似乎與 gfortran 一起作業正常)?
program test
implicit none
type compound
integer, allocatable :: A1(:)
integer, pointer :: A2(:,:)
end type compound
type(compound), target :: my
integer :: n=5, i
allocate(my
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/349715.html
上一篇:帶有基類指標的成員向量
下一篇:Cython:擴展型別的鏈表
