You tried it right. If Inno Setup used Pascal, it would even work, but since it is based on a custom Pascal Script
language with a restriction on declaring local constants, you cannot do this. Instead, you should define your constant globally:
[Code] const MethodName = 'MyExec'; function MyExec(const _filename, _params, _dir: String): Boolean; var ResultCode: Integer; begin MyLog(MethodName, _filename);
TLama source share