Compiler errors &引用;“不在循环中”;inno设置中出现错误

Compiler errors &引用;“不在循环中”;inno设置中出现错误,compiler-errors,installation,inno-setup,Compiler Errors,Installation,Inno Setup,我正在使用inno安装程序创建安装程序。 代码片段如下所示: function legacy_check(): Boolean; begin // some code end; function InitializeSetup(): Boolean; var continue:Boolean; oldVersion: String; begin continue:=legacy_check(); if not

我正在使用inno安装程序创建安装程序。 代码片段如下所示:

function legacy_check(): Boolean;
begin
  // some code
end;

function InitializeSetup(): Boolean;
var
continue:Boolean;
oldVersion: String;
begin                                  
   continue:=legacy_check();
   if not continue then 
     Result:=False;
   else
     // some other code
end;
在这里,我在第行continue:=legacy_check();得到的错误为“Not in a loop”。
有人能说出这个错误的原因吗?

Continue
在基于Pascal的语言中是一个保留字,在循环中用于跳转到当前重复语句的结尾。因此,您必须为变量选择不同的名称。例如Delphi(Delphi,因为它接近Inno Setup Pascal脚本,并且有在线参考)参考描述如下(我强调):

允许控制流继续进行for的下一次迭代, while或repeat语句。在Delphi代码中,Continue过程 使控制流继续到 包含for、while或repeat语句。 如果for、while或repeat语句未包含继续调用,编译器将报告错误。