(Gast)
n/a Beiträge
|
Re: var eine Funktion übergibt wert nicht
12. Jul 2007, 17:59
hier:
Delphi-Quellcode:
function split_filename(s_filename,s_dir,s_name:string):boolean;
var
i_dir_l:integer;
s_temp:string;
begin
if (pos('\',s_filename)<>0) then
begin
i_dir_l:=length(s_filename);
s_temp:='';
repeat
s_temp:=s_temp+s_filename[i_dir_l];
i_dir_l:=i_dir_l-1;
until (i_dir_l=0);
s_name:=split_vor(s_temp,'\',true);
s_dir:=split_nach(s_temp,'\',true);
i_dir_l:=length(s_name);
s_temp:='';
repeat
s_temp:=s_temp+s_name[i_dir_l];
i_dir_l:=i_dir_l-1;
until (i_dir_l=0);
s_name:=s_temp;
i_dir_l:=length(s_dir);
s_temp:='';
repeat
s_temp:=s_temp+s_dir[i_dir_l];
i_dir_l:=i_dir_l-1;
until (i_dir_l=0);
s_dir:=s_temp+'\';
result:=true;
end
else
begin
s_dir:='';
s_name:='';
result:=false;
end;
end;
|
|
Zitat
|