"justify"> (curNode.NextFourth.Value.City
newNode.NextFourth: = curNode.NextFourth;. NextFourth: = newNode;
end;
procedure TPlex.Del (index: integer); i: integer;: TNodePtr;
if (index> = fCount) then;
if index = 0 then
RemoveFromSecondList (fFirstHead);: = fFirstHead.NextFirst;;
curNode: = fFirstHead;
for i: = index - 2 downto 0 do: = curNode.NextFirst;
RemoveFromSecondList (curNode.NextFirst); (curNode.NextFirst); (curNode.NextFirst);
curNode.NextFirst: = curNode.NextFirst.NextFirst;;
end;
procedure TPlex.RemoveFromSecondList (node: TNodePtr);: TNodePtr;
if fSecondHead = node then: = fSecondHead.NextSecond;;;
curNode: = fSecondHead;
while curNode.NextSecond <> node do: = curNode.NextSecond;
curNode.NextSecond: = curNode.NextSecond.NextSecond;
end;
procedure TPlex.RemoveFromThirdList (node: TNodePtr);: TNodePtr;
if fThirdHead = node then: = fThirdHead.NextThird;;;
curNode: = fThirdHead;
while curNode.NextThird <> node do: = curNode.NextThird;
curNode.NextThird: = curNode.NextThird.NextThird;;
procedure TPlex.RemoveFromFourthList (node: TNodePtr);: TNodePtr;
if fFourthHead = node then: = fFourthHead.NextFourth;;;
curNode: = fFourthHead;
while curNode.NextFourth <> node do: = curNode.NextFourth;
curNode.NextFourth: = curNode.NextFourth.NextFourth;;
procedure TPlex.Sort (attribute: integer); i: integer;: boolean;
if Count <2 then;
swap: = true; swap do
swap: = false;
for i: = 0 to Count - 2 doGetI (i). Value.Surname> GetI (i + 1). Value.Surname then: = true; (i, i + 1); ;
for i: = Count - 1 to 1 doGetI (i). Value.Surname
function TPlex.GetI (index: integer): TNodePtr; curNode: TNodePtr;: Integer; (index> = Count) or (index <0) then;
curNode: = fFirsthead;
for I: = 0 to index - 1 do: = curNode.NextFirst;;
result: = curNode;;
TPlex.SwapLinks (left, right: integer); leftNode, rightNode: TNodePtr;: = GetI (left);: = GetI (right);
if (left = 0) then.NextFirst: = rightNode.NextFirst;. NextFir...