Program www_fcode_cn
use , intrinsic :: ISO_C_Binding
Implicit None
Real , target :: p( 3 , 3 )
integer :: ii=2 , iblock=1 , jj=1 , num=3
type(c_ptr),pointer::c_array(:)
Allocate( c_array(5))
c_array(num)=c_loc(p(ii-iblock,jj))
write(*,*) 'OK'
End Program www_fcode_cn
欢迎光临 Fortran Coder (http://bbs.fcode.cn/) | Powered by Discuz! X3.2 |