massiv = array [1..9000] of word;
mkts = array [0..3, 1..6, 1..16] of SmallInt;
mdl = array [0..3, 1..6, 1..15] of SmallInt;
msh = array[1..392] of SmallInt;
TPmkts = ^mkts;
TPmdl = ^mdl;
TPmsh = ^msh;
Pkts: array[1..4, 1..2] of TPmkts = ( (nil, nil),
(nil, nil), (nil, nil), (nil, nil) );
Pdl: array[1..4, 1..2] of TPmdl = ( (nil, nil),
(nil, nil), (nil, nil), (nil, nil) );
Psh: array[1..4, 1..2] of TPmsh = ( (nil, nil),
(nil, nil), (nil, nil), (nil, nil) );
begin
...
New(Pdl[1, 1]);
New(Pozu[1, 1]);
Pkts[1, 1]:= @Psh[1, 1]^[9];
for KCO:=0 to 3 do
for Tip:=1 to 6 do
begin
CCO:=1;
repeat
if PKTS[1, 1]^[KCO, Tip, CCO] = (-1) then
PDL[1, 1]^[KCO, Tip, CCO]:= 0
else
begin
i:=CCO;
repeat Inc(i);
until (PKTS[1, 1]^[KCO, Tip, i] <> (-1));
PDL[1, 1]^[KCO, Tip, CCO]:= PKTS[1, 1]^[KCO, Tip, i] -
PKTS[1, 1]^[KCO, Tip, CCO];
case Tip of
2,5 : PDL[1, 1]^[KCO, Tip, CCO]:=
PDL[1, 1]^[KCO, Tip, CCO]*5;
3,4,6: PDL[1, 1]^[KCO, Tip, CCO]:=
PDL[1, 1]^[KCO, Tip, CCO]*8;
end;
end;
Inc(CCO);
until CCO=16;
end;
..
end