根据路径取文件名的自定义函数
function getfilename(path:string):string ;  //取文件名函数
   var temps:string;
       tempi:integer;
     temps:=StrRscan(pchar(path),'\');
     tempi:=length(temps)-1 ;
   getfilename:=rightstr(temps,tempi);
end;
编译说 temps,tempi 没定义,怎么会这样?