出错01abc(续)
谢谢及时回复. 按您的提示, 如下,read(*,*) (a(i,j),j=1,n),i=1,n) ,还是报句法错误, 经略加修改,如下: read(*,*) a(i,j),j=1,n,i=1,n)1
read(*,*) (b(i,j),j=1,n,j=1,zz)
1
并且,已经附上程序要求的输入矩阵值,
但是报错:Expecting variable in READ statement at (1)
烦请有空过目, 解决. 盼复! 好!
2021-11-18
read(*,*) (( a(i,j) , j = 1 , n ) , i=1 , n ) 收到, 谢谢!
有进步,请见,如下:
Integer zz
Dimension a(30, 60), b(30, 50)
Read (*,*)jr
Do kk = 1, jr
read (*,*) n, zz, bass
read (*,*) ((a(i,j),j=1,n),i=1,n)
read (*,*) ((b(i,j),j=1,n),j=1,zz)
Print *, '--------------------------------'
Print *,' COEFFICIENT OF THE MATRIX'
..........
..........
在如下标准输入下:(Input)
331.0
9.37460 3.04160 -2.43710
3.04160 6.18320 1.21630
-2.43710 1.21630 8.44290
**********
运执行,报错如下:
Compilation failed due to following error(s). At line 5 of file main.f95 (unit = 5, file = 'stdin')
Fortran runtime error: Bad integer for item 1 in list input
Error termination. Backtrace:
#00x7f69a3e49d5a
#10x7f69a3e4a869
#20x7f69a3e4b54f
....
.....
烦请有空再看一下, 输入格式??! 盼复!
:-)
先输入 jr
然后输入 n, zz, bass 收到,谢谢 另,出错011(续),
Compiling Fortran...
C:\Program Files\Microsoft Visual Studio\Common\MSDEV98\My Projects\CELSIUS\CELSIUS.FOR
C:\Program Files\Microsoft Visual Studio\Common\MSDEV98\My Projects\CELSIUS\CELSIUS.FOR(40) : Error: Syntax error, found END-OF-STATEMENT when expecting one of: <IDENTIFIER>
DO (DABS(X1-X2)/2.GT.XTOL)
--------------------------------^
C:\Program Files\Microsoft Visual Studio\Common\MSDEV98\My Projects\CELSIUS\CELSIUS.FOR(67) : Error: Syntax error, found END-OF-STATEMENT when expecting one of: <IDENTIFIER>
DO (DABS((X1-X2)/2).GE.XTOL)
----------------------------------^
C:\Program Files\Microsoft Visual Studio\Common\MSDEV98\My Projects\CELSIUS\CELSIUS.FOR(89) : Error: Syntax error, found END-OF-STATEMENT when expecting one of: <IDENTIFIER>
DO (DABS(FNC(X1)).GE.FTOL)
--------------------------------^
Error executing df.exe.
CELSIUS.OBJ - 3 error(s), 0 warning(s) DO (DABS(X1-X2)/2.GT.XTOL)
是否为
DO while (DABS(X1-X2)/2.GT.XTOL) 收到, 谢谢
页:
[1]