我希望你能帮助我编写一个程序来转换表 (p, 3) 中的 fortran 数组 (n, m)。
我试过这个程序:
program Temp
implicit none
real,dimension (23250,27)::table
real::time
integer::i
integer::j
integer::wl
integer::al
i=1,23250
read(*,*) time(i),wl(i),(table(i,j),j=1,27)
j=1,27
alt(j)=j
write(*,*) time(i),alt(j),table(i,j)
continue
continue
endprogram Temp
但错误消息显示为:
D:\Travaux de thèse\modeling\essay\essay.f90(9) : Error: Syntax error, found ',' when expecting one of: <END-OF-STATEMENT> ;
i=1,23250
-----^
D:\Travaux de thèse\modeling\essay\essay.f90(11) : Error: Syntax error, found ',' when expecting one of: <END-OF-STATEMENT> ;
j=1,27
----^
D:\Travaux de thèse\modeling\essay\essay.f90(10) : Error: Constants and expressions are invalid in read-only I/O lists. [TIME]
read(*,*) time(i),wl(i),(table(i,j),j=1,27)
----------^
D:\Travaux de thèse\modeling\essay\essay.f90(10) : Error: Constants and expressions are invalid in read-only I/O lists. [WL]
read(*,*) time(i),wl(i),(table(i,j),j=1,27)
------------------^
D:\Travaux de thèse\modeling\essay\essay.f90(12) : Error: This name has not been declared as an array. [ALT]
alt(j)=j
^
Error executing df.exe.
essay.exe - 5 error(s), 0 warning(s)
谁能帮助我?提前谢谢你。