procedure partIV( var space : TheVoid ); var Exists : array [ sector ] of boolean; temp, was : boolean; n : integer; s : sectorIndex; line : string; begin for s := 1 to MaxSector do exists[ s ] := false; repeat readln( f, line ); until pos( 'Deployed Fighter Scan', line) > 0; readln( f, line ); {blank} readln( f, line ); { Sector Fighters ...} readln( f, line ); {===} readln( f, line ); {first line of display} while pos( 'Total', line) = 0 do begin temp := bval( copy(line, 1, 6), n ); s := n; exists[ s ] := true; readln( f, line ); end; {while} for s := 1 to MaxSector do begin Was := (space.sectors[ s ].etc and HasFighters) <> Nothing; if was and (not exists[ s ]) then begin writeln('Lost fighters in sector ', s ); space.sectors[s].etc := space.sectors[s].etc and (not HasFighters); end {if} else if exists[ s ] and (not was) then begin writeln('New fighters in sector ', s ); space.sectors[s].etc := space.sectors[s].etc or HasFighters; end; {else} end; {for} SaveData( g, space ); write('Hit return to continue...'); readln; end; {Part4}