fortran运行时出现运行FORTRAN时出现run-time error F6501: READ(D:\321\11.txt)
programMainimplicitnoneinteger,parameter::iN=51integer::iRec,ireal::rTemp(iN)open(10,...
program Main
implicit none
integer, parameter :: iN = 51
integer :: iRec, i
real :: rTemp(iN)
open (10, file = "D:\321\11.txt")
do i = 1, iN
read (10, *) rTemp(i)
end do
close (10)
open (20, file = "111.dat", form = "unformatted", access = "direct", recl = 1)
iRec = 0
do i = 1, iN
iRec = iRec + 1
write(20, rec = iRec) rTemp(i)
write(*, *) rTemp(i)
end do
close (20)
end Program Main 展开
implicit none
integer, parameter :: iN = 51
integer :: iRec, i
real :: rTemp(iN)
open (10, file = "D:\321\11.txt")
do i = 1, iN
read (10, *) rTemp(i)
end do
close (10)
open (20, file = "111.dat", form = "unformatted", access = "direct", recl = 1)
iRec = 0
do i = 1, iN
iRec = iRec + 1
write(20, rec = iRec) rTemp(i)
write(*, *) rTemp(i)
end do
close (20)
end Program Main 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询