Просто берешь и пишешь класс поддержки односвязанного списка )) Вот так сказать из личного опыта:
program sp;
{$APPTYPE CONSOLE}
uses
SysUtils;
type
plist=^filwords;
filwords=record
Loadword:string;
next:plist;
end;
procedure Push(var pPrevios:plist;var pEnd:plist;info:string );
begin
new(pEnd^.next);
pEnd^.next^.next:=nil;
pEnd^.next^.loadword:=info;
pPrevios:=pEnd^.next;
end;
procedure FindPlaceToIns(pBegin:plist;var pfind:plist;key:string);
begin
while (pBegin^.next^.Loadword<key) do
begin
pBegin:=pBegin^.next;
end;
if pBegin<>nil then
begin
pFind:=pBegin;
end
else
begin
pFind:=nil;
end;
end;
procedure Find(pBegin:plist;var pfind:plist;key:string);
begin
while (pBegin^.Loadword<>key) do
begin
pBegin:=pBegin^.next;
end;
if pBegin<>nil then
begin
pFind:=pBegin;
end
else
begin
pFind:=nil;
end;
end;
procedure InsMed(var pBegin:plist;key:string);
var
Med,pFind:plist;
begin
new(pFind);
pFind:=pBegin;
FindPlacetoIns(pBegin,pFind,key);
new(Med);
Med^.Loadword:=key;
Med^.next:=PFind^.next;
PFind^.next:=Med;
end;
procedure InsBegin(var pBegin:plist;info:string);
var
temp:plist;
begin
new(temp);
temp^.Loadword:=info;
temp^.next:=pBegin;
pBegin:=temp;
end;
procedure Pop(var pEnd:plist;pBegin:plist);
var
t,delel:plist;
begin
t:=pBegin;
delel:=PEnd;
while t^.next<>pEnd do
begin
t:=t^.next
end;
Pend:=t;
Pend^.next:=nil;
dispose(delEl);
end;
procedure Delel(var pBegin:plist;info:string);
var
t,x,dx:plist;
begin
t:=pBegin;
while t<>nil do
if t^.Loadword=info then
if t=pBegin then
begin
x:=pBegin;
pBegin:=pBegin^.next;
Dispose(x);
t:=pBegin;
end
else
begin
x:=t;
t:=t^.next;
dx^.next:=t;
Dispose(x);
end
else
begin
dx:=t;t:=t^.next;
end;
end;
procedure View(pBegin:plist);
var
count:integer;
begin
count:=0;
while pBegin<>nil do
begin
writeln(pBegin^.Loadword);
pBegin:=pBegin^.next;
count:=count+1;
writeln(count);
end;
end;
procedure CreateList(var pBegin:plist;info:string);
begin
new(pBegin);
pBegin^.Loadword:=info;
PBegin^.next:=nil;
end;
procedure Ins(var pBegin:plist;var pEnd:pList;var pFind:plist;info:string);
begin
if info>=Pend^.Loadword then
Push(pEnd,Pend,info)
else
begin
if info<=pBegin^.Loadword then
begin
InsBegin(pBegin,info);
end
else
begin
new(pFind);
pFind:=pBegin;
InsMed(pFind,info);
end;
end;
end;
var
pBegin,Pend,pFind:plist;
begin
CreateList(pBegin,'a');
new(PEnd);
pEnd:=pBegin;
Ins(pBegin,pEnd,pFind,'c');
Ins(pBegin,pEnd,pFind,'b');
Ins(pBegin,pEnd,pFind,'d');
Find(pBegin,pFind,'b');
view(pBegin);
readln;
end.