Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specifying optional (default) parameter in procedure in Inno Setup?

Tags:

inno-setup

I am trying to write a procedure in Inno setup code using default values for parameters, like in Pascal, like Procedure MyFunction(string1: string; string2: string = 'None'); begin //Do nothing end;

When I try to compile this, I get [...] Compiling [Code] section

Compiler Error! Line 10: Column 55: Semicolon (';') expected.

Can anyone find out what am I doing wrong?

like image 810
LittleFish Avatar asked Jan 11 '12 11:01

LittleFish


People also ask

Is it mandatory to specify a default value to optional parameter?

OptionalAttribute parameters do not require a default value.

Where should the default value of parameter is specified?

We can provide a default value to a particular argument in the middle of an argument list.

What is optional parameter function?

What are Optional Parameters? By definition, an Optional Parameter is a handy feature that enables programmers to pass less number of parameters to a function and assign a default value.

What is Suppressmsgboxes?

/SUPPRESSMSGBOXESInstructs Setup to suppress message boxes. Only has an effect when combined with '/SILENT' or '/VERYSILENT'. The default response in situations where there's a choice is: Yes in a 'Keep newer file? ' situation.


1 Answers

Default parameters, overloads, etc.. are not supported in "Pascal Script", the scripting engine that Inno Setup uses.

like image 73
Sertac Akyuz Avatar answered Oct 04 '22 15:10

Sertac Akyuz