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?
OptionalAttribute parameters do not require a default value.
We can provide a default value to a particular argument in the middle of an argument list.
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.
/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.
Default parameters, overloads, etc.. are not supported in "Pascal Script", the scripting engine that Inno Setup uses.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With