program main
implicit none
integer,parameter::fg=500
integer,dimension(1024*1280*fg)::a
open(12,file='xyyn.txt')
read(12,*)a
stop
end program
20150115010241.png (50.03 KB, 下载次数: 345)
pasuka 发表于 2015-1-15 08:12
把变量a改成动态数组再试试看
program main
implicit none
integer,parameter::fg=500
integer,allocatable :: a(:)
allocate(a(1024*1280*fg))
open(12,file='xyyn.txt')
read(12,*)a
write(*,*)a
stop
end program
我是一头牛 发表于 2015-1-15 09:12
将a改为动态数组 程序如下[mw_shl_code=fortran,true]program main
implicit none
integer,parameter::fg ...
欢迎光临 Fortran Coder (http://bbs.fcode.cn/) | Powered by Discuz! X3.2 |