Skip to content

Commit 2569584

Browse files
committed
Fix line length and equality check problems
1 parent 6874779 commit 2569584

File tree

1 file changed

+90
-80
lines changed

1 file changed

+90
-80
lines changed

TourExec1.1.f

Lines changed: 90 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ Program AxTest
2727
integer MoveRecord(308) ! Moves of current game
2828
character*9 day
2929
character*8 timenow
30-
integer ActualTFTTourSc(63)/453,453,453,453,453, 453,453,452,453,453,
30+
integer ActualTFTTourSc(63)/
31+
1 453,453,453,453,453, 453,453,452,453,453,
3132
1 453,453,453,453,453, 449,453,452,450,453,
3233
2 453,453,453,453,452, 453,446,453,449,453,
3334
3 453,453,453,453,453, 453,453,453,452,453,
@@ -40,7 +41,8 @@ Program AxTest
4041
call Date(day)
4142
call TIME(timenow)
4243
write(6,100) Version, day, timenow
43-
100 format(' Ax TourExec Program Output, Version ',f6.2, '.', 1H, A10, A10)
44+
100 format(' Ax TourExec Program Output, Version ',f6.2, '.', 1H,
45+
1 A10, A10)
4446
RandomSeed = Jsecnds(0) ! uses elapsed time since midnight as random seed
4547
c RandomSeed=66222 ! Uses fixed random number
4648
Write(6,103) RandomSeed
@@ -50,10 +52,12 @@ Program AxTest
5052
85 format(' Noise (per choice) = ', f8.4)
5153
5254
write(6, 104) ColType
53-
104 format(' Col Type, 1=TFT, 2=TF2F, 3=Random, 4=Pavlov. Col Type = ', i3)
54-
if (movereport=1) write(6, 105)
55-
105 format(' Move report: 1 means R, 2 means T, 3 means S, 4 means P for column.')
56-
if (GameReport=1) write(6,101)
55+
104 format(' Col Type, 1=TFT, 2=TF2F, 3=Random, 4=Pavlov. Col Type = '
56+
1 , i3)
57+
if (movereport==1) write(6, 105)
58+
105 format(' Move report: 1 means R, 2 means T, 3 means S, 4 means P
59+
1 for column.')
60+
if (GameReport==1) write(6,101)
5761
101 format(' Rank Game RScore CScore #ColR #ColT #ColS #ColP')
5862
ITotalColPoints = 0 ! Initialize Col's total points
5963
Do 30 row= minRow,maxRow ! normally 1 to 63
@@ -71,10 +75,12 @@ Program AxTest
7175
10 Continue ! End Do tallyType
7276
Do 15 Move = 1, Length(Game)
7377
RandomNumber = RAN(RandomSeed)
74-
RowChoice = KRowFunction(JB,Move, RowGameSc,ColGameSc,RandomNumber,Row,JA)
78+
RowChoice = KRowFunction(JB,Move, RowGameSc,ColGameSc,
79+
1 RandomNumber,Row,JA)
7580
if ( RAN(RandomSeed) < noise ) RowChoice = 1-RowChoice ! noise happened to Row
7681
RandomNumber = RAN(RandomSeed)
77-
ColChoice = KColFunction(JA,Move,ColGameSc,RowGameSc,RandomNumber,ColType,JB)
82+
ColChoice = KColFunction(JA,Move,ColGameSc,RowGameSc,
83+
1 RandomNumber,ColType,JB)
7884
if ( RAN(RandomSeed) < noise ) ColChoice = 1 - ColChoice ! noise happened to Col
7985
C temp test:
8086
c Write(6, 999) Move, RowChoice, ColChoice
@@ -103,38 +109,42 @@ Program AxTest
103109
C write game output
104110
RowPairSc=RowPairSc+RowGameSc ! sum over 5 games
105111
ColPairSc=ColPairSc+ColGameSc
106-
if (GameReport=1) Write(6, 110) Rank, Game, RowGameSc,
112+
if (GameReport==1) Write(6, 110) Rank, Game, RowGameSc,
107113
1 ColGameSc, Tally(1), Tally(2), Tally(3), Tally(4)
108114
110 format(9i6, 10i3)
109-
if (movereport .eq. 1) write(6, 112) (MoveRecord(ir), ir=1,length(game))
115+
if (movereport .eq. 1) write(6, 112) (MoveRecord(ir), ir=1,
116+
1 length(game))
110117
112 format(' ', 10i2, 2H, 10i2, 2H, 10i2, 2H, 10i2)
111118
20 Continue ! End Do Game
112-
if (GameReport=1) write(6, 115) RowPairSc, ColPairSc
119+
if (GameReport==1) write(6, 115) RowPairSc, ColPairSc
113120
IRowPairSc(Row) = RowPairSc ! total over 5 games
114121
IColPairSc(Row) = ColPairSc
115122
IColTourSc = IColTourSc +ColPairSc ! running total of col's points
116-
115 format(' Totals over 5 games: RowPairSc= ',I7, ' ColPairSc = ', I7)
117-
if (GameReport=1) write (6, 120)
123+
115 format('Totals over 5 games: RowPairSc= ',I7, ' ColPairSc = ', I7)
124+
if (GameReport==1) write (6, 120)
118125
120 format()
119126

120127
30 Continue ! End Do Row
121128

122129
C final report: calc tour score, write tour output
123130

124131
Write(6, 135)
125-
135 format(' Rank RowSc ColSc AveRowSc AveColSc 2ndRndTFT 2ndRndTFT-Col')
132+
135 format(' Rank RowSc ColSc AveRowSc AveColSc 2ndRndTFT
133+
1 2ndRndTFT-Col')
126134
Do 40 Row = minRow,maxRow
127135
IRowTourPairSc = IRowPairSc(Row)/5
128136
IColTourPairSc = IColPairSc(Row)/5
129137
ITotalColPoints = ITotalColPoints + IColPairSc(Row) ! accumulate col points
130-
Write(6, 140) Row, IRowPairSc(Row), IColPairSc(Row),IRowTourPairSc,
131-
2 IColTourPairSc, ActualTFTTourSc(Row), ActualTFTTourSc(Row)-IColTourPairSc
138+
Write(6, 140) Row, IRowPairSc(Row), IColPairSc(Row),
139+
1 IRowTourPairSc,IColTourPairSc, ActualTFTTourSc(Row),
140+
2 ActualTFTTourSc(Row)-IColTourPairSc
132141
140 format(i6, 4i8, ' ',i8,' ',i8)
133142
40 continue ! end final report
134143
TotalColPoints = ITotalColPoints ! to make floating point (total over 63*5 games)
135144
ColTourSc =(TotalColPoints/5 )/63 ! Ave per game over 63 pairs
136145
write(6, 150) ColType, ITotalColPoints, ColTourSc
137-
150 format(' Col Type= ', i4, '. Col Pts = ', i7, ' Col"s Tour Sc = ', f7.3)
146+
150 format(' Col Type= ', i4, '. Col Pts = ', i7, ' Cols Tour Sc = '
147+
1 , f7.3)
138148
end ! Main Program
139149
C-----------------------------
140150
Function KColFunction(J,M,K,L,R,IColType,JB) ! Look up col rule, return col choice
@@ -183,95 +193,95 @@ Function KRowFunction(J,M,K,L,R,iRow,JA) ! Look up row rule, return rowch
183193
if (irow>16 ) goto 117
184194
if (irow>8 ) goto 109
185195
if (irow>4 ) goto 105
186-
if(irow=1) KRowFunction = K92R(J,M,K,L,R,JA)
187-
if(irow=2) KRowFunction = K61R(J,M,K,L,R,JA)
188-
if(irow=3) KRowFunction = K42R(J,M,K,L,R,JA)
189-
if(irow=4) KRowFunction = K49R(J,M,K,L,R,JA)
196+
if(irow==1) KRowFunction = K92R(J,M,K,L,R,JA)
197+
if(irow==2) KRowFunction = K61R(J,M,K,L,R,JA)
198+
if(irow==3) KRowFunction = K42R(J,M,K,L,R,JA)
199+
if(irow==4) KRowFunction = K49R(J,M,K,L,R,JA)
190200
return
191-
105 if(irow=5) KRowFunction = K44R(J,M,K,L,R,JA)
192-
if(irow=6) KRowFunction = K60R(J,M,K,L,R,JA)
193-
if(irow=7) KRowFunction = K41R(J,M,K,L,R,JA)
194-
if(irow=8) KRowFunction = K75R(J,M,K,L,R,JA)
201+
105 if(irow==5) KRowFunction = K44R(J,M,K,L,R,JA)
202+
if(irow==6) KRowFunction = K60R(J,M,K,L,R,JA)
203+
if(irow==7) KRowFunction = K41R(J,M,K,L,R,JA)
204+
if(irow==8) KRowFunction = K75R(J,M,K,L,R,JA)
195205
return
196206
109 if(irow>12) goto 113
197-
if(irow=9) KRowFunction = K84R(J,M,K,L,R,JA)
198-
if(irow=10) KRowFunction = K32R(J,M,K,L,R,JA)
199-
if(irow=11) KRowFunction = K35R(J,M,K,L,R,JA)
200-
if(irow=12) KRowFunction = K68R(J,M,K,L,R,JA)
207+
if(irow==9) KRowFunction = K84R(J,M,K,L,R,JA)
208+
if(irow==10) KRowFunction = K32R(J,M,K,L,R,JA)
209+
if(irow==11) KRowFunction = K35R(J,M,K,L,R,JA)
210+
if(irow==12) KRowFunction = K68R(J,M,K,L,R,JA)
201211
return
202-
113 if(irow=13) KRowFunction = K72R(J,M,K,L,R,JA)
203-
if(irow=14) KRowFunction = K46R(J,M,K,L,R,JA)
204-
if(irow=15) KRowFunction = K83R(J,M,K,L,R,JA)
205-
if(irow=16) KRowFunction = K47R(J,M,K,L,R,JA)
212+
113 if(irow==13) KRowFunction = K72R(J,M,K,L,R,JA)
213+
if(irow==14) KRowFunction = K46R(J,M,K,L,R,JA)
214+
if(irow==15) KRowFunction = K83R(J,M,K,L,R,JA)
215+
if(irow==16) KRowFunction = K47R(J,M,K,L,R,JA)
206216
return
207217
117 if (irow>24 ) goto 125
208218
if (irow>20 ) goto 121
209-
if(irow=17) KRowFunction = K64R(J,M,K,L,R,JA)
210-
if(irow=18) KRowFunction = K51R(J,M,K,L,R,JA)
211-
if(irow=19) KRowFunction = K78R(J,M,K,L,R,JA)
212-
if(irow=20) KRowFunction = K66R(J,M,K,L,R,JA)
219+
if(irow==17) KRowFunction = K64R(J,M,K,L,R,JA)
220+
if(irow==18) KRowFunction = K51R(J,M,K,L,R,JA)
221+
if(irow==19) KRowFunction = K78R(J,M,K,L,R,JA)
222+
if(irow==20) KRowFunction = K66R(J,M,K,L,R,JA)
213223
return
214-
121 if(irow=21) KRowFunction = K58R(J,M,K,L,R,JA)
215-
if(irow=22) KRowFunction = K88R(J,M,K,L,R,JA)
216-
if(irow=23) KRowFunction = K31R(J,M,K,L,R,JA)
217-
if(irow=24) KRowFunction = K90R(J,M,K,L,R,JA)
224+
121 if(irow==21) KRowFunction = K58R(J,M,K,L,R,JA)
225+
if(irow==22) KRowFunction = K88R(J,M,K,L,R,JA)
226+
if(irow==23) KRowFunction = K31R(J,M,K,L,R,JA)
227+
if(irow==24) KRowFunction = K90R(J,M,K,L,R,JA)
218228
return
219229
125 if (irow>28 ) goto 129
220-
if(irow=25) KRowFunction = K39R(J,M,K,L,R,JA)
221-
if(irow=26) KRowFunction = K79R(J,M,K,L,R,JA)
222-
if(irow=27) KRowFunction = K67R(J,M,K,L,R,JA)
223-
if(irow=28) KRowFunction = K86R(J,M,K,L,R,JA)
230+
if(irow==25) KRowFunction = K39R(J,M,K,L,R,JA)
231+
if(irow==26) KRowFunction = K79R(J,M,K,L,R,JA)
232+
if(irow==27) KRowFunction = K67R(J,M,K,L,R,JA)
233+
if(irow==28) KRowFunction = K86R(J,M,K,L,R,JA)
224234
return
225-
129 if(irow=29) KRowFunction = K69R(J,M,K,L,R,JA)
226-
if(irow=30) KRowFunction = K91R(J,M,K,L,R,JA)
227-
if(irow=31) KRowFunction = K57R(J,M,K,L,R,JA)
228-
if(irow=32) KRowFunction = K70R(J,M,K,L,R,JA)
235+
129 if(irow==29) KRowFunction = K69R(J,M,K,L,R,JA)
236+
if(irow==30) KRowFunction = K91R(J,M,K,L,R,JA)
237+
if(irow==31) KRowFunction = K57R(J,M,K,L,R,JA)
238+
if(irow==32) KRowFunction = K70R(J,M,K,L,R,JA)
229239
return
230240
133 if (irow>48 ) goto 149
231241
if (irow>40 ) goto 141
232242
if (irow>36 ) goto 137
233-
if(irow=33) KRowFunction = K85R(J,M,K,L,R,JA)
234-
if(irow=34) KRowFunction = K38R(J,M,K,L,R,JA)
235-
if(irow=35) KRowFunction = K40R(J,M,K,L,R,JA)
236-
if(irow=36) KRowFunction = K80R(J,M,K,L,R,JA)
243+
if(irow==33) KRowFunction = K85R(J,M,K,L,R,JA)
244+
if(irow==34) KRowFunction = K38R(J,M,K,L,R,JA)
245+
if(irow==35) KRowFunction = K40R(J,M,K,L,R,JA)
246+
if(irow==36) KRowFunction = K80R(J,M,K,L,R,JA)
237247
return
238-
137 if(irow=37) KRowFunction = K37R(J,M,K,L,R,JA)
239-
if(irow=38) KRowFunction = K56R(J,M,K,L,R,JA)
240-
if(irow=39) KRowFunction = K43R(J,M,K,L,R,JA)
241-
if(irow=40) KRowFunction = K59R(J,M,K,L,R,JA)
248+
137 if(irow==37) KRowFunction = K37R(J,M,K,L,R,JA)
249+
if(irow==38) KRowFunction = K56R(J,M,K,L,R,JA)
250+
if(irow==39) KRowFunction = K43R(J,M,K,L,R,JA)
251+
if(irow==40) KRowFunction = K59R(J,M,K,L,R,JA)
242252
return
243253
141 if(irow>44) goto 145
244-
if(irow=41) KRowFunction = K73R(J,M,K,L,R,JA)
245-
if(irow=42) KRowFunction = K55R(J,M,K,L,R,JA)
246-
if(irow=43) KRowFunction = K81R(J,M,K,L,R,JA)
247-
if(irow=44) KRowFunction = K87R(J,M,K,L,R,JA)
254+
if(irow==41) KRowFunction = K73R(J,M,K,L,R,JA)
255+
if(irow==42) KRowFunction = K55R(J,M,K,L,R,JA)
256+
if(irow==43) KRowFunction = K81R(J,M,K,L,R,JA)
257+
if(irow==44) KRowFunction = K87R(J,M,K,L,R,JA)
248258
return
249-
145 if(irow=45) KRowFunction = K53R(J,M,K,L,R,JA)
250-
if(irow=46) KRowFunction = K76R(J,M,K,L,R,JA)
251-
if(irow=47) KRowFunction = K65R(J,M,K,L,R,JA)
252-
if(irow=48) KRowFunction = K52R(J,M,K,L,R,JA)
259+
145 if(irow==45) KRowFunction = K53R(J,M,K,L,R,JA)
260+
if(irow==46) KRowFunction = K76R(J,M,K,L,R,JA)
261+
if(irow==47) KRowFunction = K65R(J,M,K,L,R,JA)
262+
if(irow==48) KRowFunction = K52R(J,M,K,L,R,JA)
253263
return
254264
149 if (irow>56 ) goto 157
255265
if (irow>52 ) goto 153
256-
if(irow=49) KRowFunction = K82R(J,M,K,L,R,JA)
257-
if(irow=50) KRowFunction = K45R(J,M,K,L,R,JA)
258-
if(irow=51) KRowFunction = K62R(J,M,K,L,R,JA)
259-
if(irow=52) KRowFunction = K34R(J,M,K,L,R,JA)
266+
if(irow==49) KRowFunction = K82R(J,M,K,L,R,JA)
267+
if(irow==50) KRowFunction = K45R(J,M,K,L,R,JA)
268+
if(irow==51) KRowFunction = K62R(J,M,K,L,R,JA)
269+
if(irow==52) KRowFunction = K34R(J,M,K,L,R,JA)
260270
return
261-
153 if(irow=53) KRowFunction = K48R(J,M,K,L,R,JA)
262-
if(irow=54) KRowFunction = K50R(J,M,K,L,R,JA)
263-
if(irow=55) KRowFunction = K77R(J,M,K,L,R,JA)
264-
if(irow=56) KRowFunction = K89R(J,M,K,L,R,JA)
271+
153 if(irow==53) KRowFunction = K48R(J,M,K,L,R,JA)
272+
if(irow==54) KRowFunction = K50R(J,M,K,L,R,JA)
273+
if(irow==55) KRowFunction = K77R(J,M,K,L,R,JA)
274+
if(irow==56) KRowFunction = K89R(J,M,K,L,R,JA)
265275
return
266276
157 if (irow>60) goto 161
267-
if(irow=57) KRowFunction = K63R(J,M,K,L,R,JA)
268-
if(irow=58) KRowFunction = K54R(J,M,K,L,R,JA)
269-
if(irow=59) KRowFunction = K33R(J,M,K,L,R,JA)
270-
if(irow=60) KRowFunction = K71R(J,M,K,L,R,JA)
277+
if(irow==57) KRowFunction = K63R(J,M,K,L,R,JA)
278+
if(irow==58) KRowFunction = K54R(J,M,K,L,R,JA)
279+
if(irow==59) KRowFunction = K33R(J,M,K,L,R,JA)
280+
if(irow==60) KRowFunction = K71R(J,M,K,L,R,JA)
271281
return
272-
161 if(irow=61) KRowFunction = K74R(J,M,K,L,R,JA)
273-
if(irow=62) KRowFunction = K93R(J,M,K,L,R,JA)
274-
if(irow=63) KRowFunction = K36R(J,M,K,L,R,JA)
282+
161 if(irow==61) KRowFunction = K74R(J,M,K,L,R,JA)
283+
if(irow==62) KRowFunction = K93R(J,M,K,L,R,JA)
284+
if(irow==63) KRowFunction = K36R(J,M,K,L,R,JA)
275285
return
276286
END
277287
c----------------------------------------------------

0 commit comments

Comments
 (0)