Is there any command/construct like return
in C that exits immediately from a function of Inno Setup script code keeping the result code?
I would like something
If k = false then
Begin
Result:=false;
Exit;
End;
Is there any command/construct like return
in C that exits immediately from a function of Inno Setup script code keeping the result code?
I would like something
If k = false then
Begin
Result:=false;
Exit;
End;
Your code is correct.
Use the
Exit
statement to exit afunction
or aprocedure
. With thefunction
, set theResult
automatic variable, before you call theExit
, to set the return value.