中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-09-14 23:27
47,812 topics / 349,917 posts / today 0 new / 48,268 members
DOS开发编程 & 发展交流 (开发室) » Notes on Compiling FORTRAN
Printable Version  2,911 / 4
Floor1 kickout Posted 2002-10-28 00:00
高级用户 Posts 135 Credits 667
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
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Floor2 Sandy Posted 2002-10-30 00:00
元老会员 Posts 157 Credits 608
Fortran77 is not as good as Basica
Floor3 kickout Posted 2002-11-02 00:00
高级用户 Posts 135 Credits 667
fortran77 is a powerful engineering calculation language. Its calculation precision is far beyond what basic can match...
Floor4 yiyesong Posted 2002-11-02 00:00
元老会员 Posts 632 Credits 1,987
fortran has no real practical use; in most cases it's only used for teaching.
Floor5 Sandy Posted 2002-11-03 00:00
元老会员 Posts 157 Credits 608
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023