Putting a number in column 6 meant that the line was a continuation of the previous line. Putting a C in
column 1 meant that the line was a comment, not a program statement.
Variables beginning with letters I, J, K, L, M, or N were integers, and all others were floating point (characters
could be read into integer-type variables).
If you are interested in trying out this program, a free FORTRAN compiler, called GNU FORTRAN G77, is
available from the Free Software Foundation. You can find the download link at http://kkourakis.tripod.com/.
The following program from Cooley and Lohnes was used to compute average scores on each of several tests
for each student in a study.
PROGRAM CLAVG
C
C COMPUTE AVERAGE OF M SCORES FOR EACH OF N SUBJECTS
C INPUT:
C FIRST CARD CONTAINS N IN COLS 1-5, AND M IN COLS 6-10
C FOLLOWING CARDS ARE SCORE CARDS, ONE SET PER SUBJECT.
C FIRST CARD PER SET CONTAINS ID IN COLS 1-5 AND UP TO
C 25 SCORES IN 3-COLUMN FIELDS. ID FIELD MAY BE
C BLANK IN ADDITIONAL CARDS IN A SET
C COOLEY, W & LOHNES, P, MULTIVARIATE DATA ANALYSIS, 1971
C
DIMENSION X(1000)
READ( *, 1 ) N, M
1 FORMAT( 2I5 )
WRITE( *, 2 ) M, N
2 FORMAT( 'AVERAGES ON ', I6, ' TESTS FOR EACH OF ', I6,
1??™ SUBJECTS??™ )
EM=M
CHAP.
Pages:
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137