Can you define a function prototype in Inno Setup
I would like to be able to structure my code for my Inno setup project, but I have to move the code around because you cannot call a function if it is not defined first.
Is there a way to declare the prototype from above so that I don't get the "Unknown ID" error and so that I can structure my code in logical blocks.
+3
AnthonyVO
source
to share
1 answer
In Pascal (including the Pascal Script used in Inno Setup), you can define a function prototype (aka forward) using the keyword forward
:
procedure ProcA(ParamA: Integer); forward; procedure ProcB; begin ProcA(1); end; procedure ProcA(ParamA: Integer); begin { some code } end;
See Forward Declared Functions .
+5
Martin Prikryl
source
to share