A
alpfeng
Unregistered / Unconfirmed
GUEST, unregistred user!
用结构体.
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 s do
if shu='/' then
pfilename:=copy(files,i,lenght(files));
ffilename:=files-Pfilename;
end;
result:=filename;
end;
仅供参考
请问怎么用该函数返回值,比如我给函数一个参数file,让它返回pfilename,ffilename。请问代码怎么写,谢谢,急啊
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 s do
if shu='/' then
pfilename:=copy(files,i,lenght(files));
ffilename:=files-Pfilename;
end;
result:=filename;
end;
仅供参考
请问怎么用该函数返回值,比如我给函数一个参数file,让它返回pfilename,ffilename。请问代码怎么写,谢谢,急啊