delphi程序调试(ExtractFilePath)

来源:百度知道 编辑:UC知道 时间:2024/06/30 06:24:53
我引用的一段程序是这样的
procedure TBFSA.readparamt;
var
vA,vL,vT,vNd,vLd,vS,vH,vNum: textfile;
outf: textfile;
vTempStr: string;
i,indx: integer;
begin
gbparamt.path:=ExtractFilePath(application.exename);
AssignFile(vA,gbparamt.path+'算法参数.txt');
AssignFile(vL,gbparamt.path+'线路参数.txt');

出了错误
[Error] YhBFSAUnit.pas(1820): Undeclared identifier: 'gbparamt'
[Error] YhBFSAUnit.pas(1820): Undeclared identifier: 'application'
[Error] YhBFSAUnit.pas(1820): ')' expected but identifier 'exename' found
请各位高手看看错误在那啊? 请您不吝指教 非常感谢!

来源: http://www.programbbs.com/bbs/announce.asp?boardid=12

procedure TBFSA.readparamt;
var
vA,vL,vT,vNd,vLd,vS,vH,vNum: textfile;
outf: textfile;
vTempStr: string;
i,indx: integer;
wahveyPath: String;
begin
wahveyPath:=ExtractFilePath(application.exename);
AssignFile(vA,wahveyPath+'算法参数.txt');
AssignFile(vL,wahveyPath+'线路参数.txt');