Inno setup 在Inno Setup Pascal脚本中声明变量

Inno setup 在Inno Setup Pascal脚本中声明变量,inno-setup,pascalscript,Inno Setup,Pascalscript,我已将以下代码添加到脚本中: [代码] 函数IsSomeAppInstalled:布尔值; 开始 结果:=FileExists(ExpandConstant('{pf32}\SomeApp\Some.dll'); 结束; 函数InitializeSetup():Boolean; 开始 布尔值bIsInstalled:=IsSomeAppInstalled(); MsgBox('IsSomeAppInstalled:'+IntToStr(Integer(bIsInstalled)),MB信息,MB

我已将以下代码添加到脚本中:

[代码]
函数IsSomeAppInstalled:布尔值;
开始
结果:=FileExists(ExpandConstant('{pf32}\SomeApp\Some.dll');
结束;
函数InitializeSetup():Boolean;
开始
布尔值bIsInstalled:=IsSomeAppInstalled();
MsgBox('IsSomeAppInstalled:'+IntToStr(Integer(bIsInstalled)),MB信息,MB_OK);
结果:=真;
结束;
线路

Boolean bIsInstalled := IsSomeAppInstalled();
引起错误

内部错误(20)

这里可能有什么错误?

在Pascal(脚本)中,在实际代码之前:

函数InitializeSetup():布尔值;
变量
b:布尔值;
开始
bIsInstalled:=IsSomeAppInstalled();
MsgBox('IsSomeAppInstalled:'+IntToStr(Integer(bIsInstalled)),MB信息,MB_OK);
结果:=真;
结束;