fortran数组shape和范围的转换 - 悲催的科学匠人 - 冷水's blog
fortran数组shape和范围的转换
http://chasm-interop.sourceforge.net/
http://software.intel.com/en-us/forums/showthread.php?t=40376&wapkw=%28%2Bfortran...%29
http://coding.derkeiler.com/Archive/Fortran/comp.lang.fortran/2004-06/0500.html
http://publib.boulder.ibm.com/infocenter/cellcomp/v9v111/index.jsp?topic=/com.ibm.xlf111.cell.doc/xlflr/f90pass.htm
gfortran 4.5不行, ifort 12可以
program tt use iso_c_binding implicit none integer,target :: a(100),n,i,j integer,pointer,dimension(:) :: ptr integer,pointer,dimension(:,:) :: p2d,p2d2 type(c_ptr) :: cptr do n=1,100; a(n)=n;enddo ptr(0:29) => a(71:100) write(*,*) ptr p2d2(0:9,0:9) => a do j=0,9;do i=0,9 write(*,*) i,j,p2d2(i,j) enddo;enddo end