在 Inno Setup Pascal 脚本中声明变量
Declaring variable in Inno Setup Pascal Script
我已将以下代码添加到我的脚本中:
[Code]
function IsSomeAppInstalled: Boolean;
begin
Result := FileExists(ExpandConstant('{pf32}\SomeApp\Some.dll'));
end;
function InitializeSetup(): Boolean;
begin
Boolean bIsInstalled := IsSomeAppInstalled();
MsgBox('IsSomeAppInstalled: ' + IntToStr(Integer(bIsInstalled)),
mbInformation, MB_OK);
Result := true;
end;
行
Boolean bIsInstalled := IsSomeAppInstalled();
引发错误
Internal error (20)
这里可能是什么错误?
在 Pascal(脚本)中,您 declare variables using var
keyword 在实际代码之前:
function InitializeSetup(): Boolean;
var
bIsInstalled: Boolean;
begin
bIsInstalled := IsSomeAppInstalled();
MsgBox('IsSomeAppInstalled: ' + IntToStr(Integer(bIsInstalled)),
mbInformation, MB_OK);
Result := true;
end;
我已将以下代码添加到我的脚本中:
[Code]
function IsSomeAppInstalled: Boolean;
begin
Result := FileExists(ExpandConstant('{pf32}\SomeApp\Some.dll'));
end;
function InitializeSetup(): Boolean;
begin
Boolean bIsInstalled := IsSomeAppInstalled();
MsgBox('IsSomeAppInstalled: ' + IntToStr(Integer(bIsInstalled)),
mbInformation, MB_OK);
Result := true;
end;
行
Boolean bIsInstalled := IsSomeAppInstalled();
引发错误
Internal error (20)
这里可能是什么错误?
在 Pascal(脚本)中,您 declare variables using var
keyword 在实际代码之前:
function InitializeSetup(): Boolean;
var
bIsInstalled: Boolean;
begin
bIsInstalled := IsSomeAppInstalled();
MsgBox('IsSomeAppInstalled: ' + IntToStr(Integer(bIsInstalled)),
mbInformation, MB_OK);
Result := true;
end;