用结构体.
type
Tfilename=recorde
ffilename:string ;
pfilename:string ;
end;
.
.
function findfile(var files:sting):tfilename;
var
filename:Tfilename;
s,i:integer;
begin
s;=pos(files,.);
shu[100]:=files;
for i=0 to sdo
begin
if shu='/' then
pfilename:=copy(files,i,lenght(files));
ffilename:=files-Pfilename;
end;
result:=filename;
end;
仅供参考