In the mechanical engineering department computer lab, the language used most is FORTRAN. But FORTRAN can really be too annoying sometimes. When there are too many compile errors, you can hardly even see them clearly. What to do?
When compiling, the compiler will ask you:
Microsoft FORTRAN77 V3.13 8/05/83
Object filename :
Source listing :
Object listing :
Usually everyone just presses Enter to ignore it, but actually at
Source listing :
on that line you should give an LST filename, such as A.LST. Open this file and you can see the following:
1. FORTRAN version information
2. Source listing
line number statement
*****error information
3. Variable information
4. Summary
This way, you can clearly see the error location and type, which makes it convenient to check, and then
fix it in the source program.
An example is attached below:
A.LST file:
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Page 1
04-30-98
11:48:39
D Line# 1 7 Microsoft FORTRAN77 V3.13 8/05/83
1 PROGRAM EXAN1
2 REAL L1,L2,IA
***** Error 5 -- label in continuation line
***** Error 23 -- extra characters at end of statement
3 WRITE(*,*)'INPUT X1,X2,L1,L2,C,U,T'
4 READ(*,) X1,X2,L1,L2,C,U,T
***** Error 50 -- invalid symbol in expression
***** Error 166 -- integer variable expected
5 IA=X1*((L1+0.4)+X2*(0.5*L2+0.2)
***** Error 26 -- "
" expected
6 EM=57.2*C*IA*U**3.3/T
7 WRITE(*,*) 'IA=',IA ;
***** Error 17 -- invalid character in input
8 write(*,*) 'EM=', EM
9
10
11
***** Error 91 -- missing END statement
Name Type Offset P Class
C REAL 18
EM REAL 34
IA INTEGER*4 30
L1 INTEGER*4 10
L2 INTEGER*4 14
T REAL 26
U REAL 22
X1 REAL 2
X2 REAL 6
Name Type Size Class
EXAN1L PROGRAM
Pass One 7 Errors Detected
11 Source Lines
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
When compiling, the compiler will ask you:
Microsoft FORTRAN77 V3.13 8/05/83
Object filename :
Source listing :
Object listing :
Usually everyone just presses Enter to ignore it, but actually at
Source listing :
on that line you should give an LST filename, such as A.LST. Open this file and you can see the following:
1. FORTRAN version information
2. Source listing
line number statement
*****error information
3. Variable information
4. Summary
This way, you can clearly see the error location and type, which makes it convenient to check, and then
fix it in the source program.
An example is attached below:
A.LST file:
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Page 1
04-30-98
11:48:39
D Line# 1 7 Microsoft FORTRAN77 V3.13 8/05/83
1 PROGRAM EXAN1
2 REAL L1,L2,IA
***** Error 5 -- label in continuation line
***** Error 23 -- extra characters at end of statement
3 WRITE(*,*)'INPUT X1,X2,L1,L2,C,U,T'
4 READ(*,) X1,X2,L1,L2,C,U,T
***** Error 50 -- invalid symbol in expression
***** Error 166 -- integer variable expected
5 IA=X1*((L1+0.4)+X2*(0.5*L2+0.2)
***** Error 26 -- "
" expected6 EM=57.2*C*IA*U**3.3/T
7 WRITE(*,*) 'IA=',IA ;
***** Error 17 -- invalid character in input
8 write(*,*) 'EM=', EM
9
10
11
***** Error 91 -- missing END statement
Name Type Offset P Class
C REAL 18
EM REAL 34
IA INTEGER*4 30
L1 INTEGER*4 10
L2 INTEGER*4 14
T REAL 26
U REAL 22
X1 REAL 2
X2 REAL 6
Name Type Size Class
EXAN1L PROGRAM
Pass One 7 Errors Detected
11 Source Lines
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
================================= kickout
大功告成,打个Kiss!
大功告成,打个Kiss!

