how NOT to program in FORTRAN
  Home FAQ Contact Sign in
comp.lang.fortran only
 
Advanced search
POPULAR GROUPS

more...

 Up
how NOT to program in FORTRAN         

Group: comp.lang.fortran · Group Profile
Author: Beliavsky
Date: Dec 14, 2006 08:19

I purchased the book

"Computational Methods in Statistics and Econometrics"
by Hisashi Tanizaki
Marcel Dekker (2004)

in part because there is a CD-ROM of Fortran 77 and C codes
accompanying the book, whose table of contents is at
http://ht.econ.kobe-u.ac.jp/~tanizaki/cv/books/cmse/cmse.pdf .

Browsing a source file at random, I see one starting as follows:

c ARCH Model

implicit real*8 (a-h,o-z)
dimension y(200),a(200)
dimension fave0(0:201) ,fa0(200) ,fv0(200)
dimension save0(0:201) ,sa0(200) ,sv0(200)
dimension fvar0(0:201)
dimension svar0(0:201)
dimension fave1(0:201) ,fa1(200) ,fv1(200)
dimension save1(0:201) ,sa1(200) ,sv1(200)
ix = 1
iy = 1
ix1= 1
iy1= 3
is=1000
do 10 i=1,1000
call urnd(ix ,iy ,rn)
10 call urnd(ix1,iy1,rn)

Good grief! Even FORTRAN 77 had PARAMETERs, and the code has other
problems besides heavy use of magic numbers.

Having vented, I feel better now.
3 Comments
diggit! del.icio.us! reddit!