China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-24 01:14
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » Notes on Compiling FORTRAN View 2,682 Replies 4
Original Poster Posted 2002-10-28 00:00 ·  中国 江西 吉安 电信
高级用户
★★
Credits 667
Posts 135
Joined 2002-10-25 00:00
23-year member
UID 62
Gender Male
Status Offline
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
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
================================= kickout
大功告成,打个Kiss!
Floor 2 Posted 2002-10-30 00:00 ·  中国 四川 德阳 电信
元老会员
★★
联盟“管理员”
Credits 608
Posts 157
Joined 2002-10-18 00:00
23-year member
UID 20
Gender Male
Status Offline
Fortran77 is not as good as Basica
La guerre, c'est le pax
Freedom is Slavery
无知就是力量
Floor 3 Posted 2002-11-02 00:00 ·  中国 江西 吉安 电信
高级用户
★★
Credits 667
Posts 135
Joined 2002-10-25 00:00
23-year member
UID 62
Gender Male
Status Offline
fortran77 is a powerful engineering calculation language. Its calculation precision is far beyond what basic can match...
================================= kickout
大功告成,打个Kiss!
Floor 4 Posted 2002-11-02 00:00 ·  中国 湖北 随州 电信
元老会员
★★★
Credits 1,987
Posts 632
Joined 2002-10-27 00:00
23-year member
UID 73
Gender Male
Status Offline
fortran has no real practical use; in most cases it's only used for teaching.
http://dos.e-stone.cn/dosbbs
uploadImages/200311161145850422.swf
Floor 5 Posted 2002-11-03 00:00 ·  中国 四川 德阳 电信
元老会员
★★
联盟“管理员”
Credits 608
Posts 157
Joined 2002-10-18 00:00
23-year member
UID 20
Gender Male
Status Offline
La guerre, c'est le pax
Freedom is Slavery
无知就是力量
Forum Jump: