{******************************************************************************************}
BEGIN {GENERIC}
(* NOTE: Your arrays go from 1 to 1200 *)
FOR x := -22 to 12 DO {zero out SM matrix}
BEGIN
(* so you can either do the following to zero them *)
SM[x+23] := 0; w[x+23] := 0; l[x+23] := 0;
END;
(* OR you can do this:
for x:= 1 to 35 do
begin
SM[x]:= 0; w[x] := 0; l[x] := 0;
end;
*)
lastyear := 116; {adjust manually for each run}
FOR year := 124 downto lastyear DO
BEGIN
Assignfile (year, filename);
assign (infile, filename); reset (infile);
num := 0;
WHILE NOT eof (infile) DO
BEGIN {WHILE}
readln (infile, ateam, hteam, ascore, hscore, spread, d, TV);
IF (ateam<197) AND (hteam<197) AND (ABS(spread)<100.0) THEN {add to matrix}
BEGIN
num := num + 1; {REMEMBER -- spread points to AT not HT} {proceed with regular HT regimen}
cs := -spread; {cs = converted spread = points to HT}
LC := LineCell(cs);
write (year,'/');
{ SM[LineCell] := 6;
w[LineCell] := 6;
l[LineCell] := 6; }
END
END; {WHILE}
write (year,'/');
close (infile);
{ IF year = lastyear THEN writeln (lastyear) ELSE write (year,'/'); }
END; {FOR}
END. {GENERIC}