Reputation: 4428
I have not been using Inno Setup for some years, but now I needed to rerun an .iss file from 2014. It used to work, but now I get Unknown identifier
on this line:
[Setup]
AppName=errw32
AppVerName=errw32 (ver 0.58)
DefaultDirName={pf}\errw32
[Code]
{ /////////////////////////////////////////////////////////
//// Messages etc }
function myassert(bTrue : boolean ; sMsg : string ): boolean;
begin
end; { myassert }
function err_dir_Known(): string;
begin
end; { err_dir_Known }
function Check_err_dir_Ok() : boolean;
begin
if not myassert(length(err_dir_Known()) > 0, 'err_dir unknown in Check_err_dir_Ok')
then exit;
end; { Check_err_dir_Ok }
The error message is:
Line 21:
Column 11:
Unknown identifier 'myassert'
Note that the function myassert
is defined above this error in the script file.
Is this perhaps a syntax error now (in Pascal
)? Or what is wrong?
EDIT: Included a complete example that fails.
Upvotes: 0
Views: 2052
Reputation: 4428
Thanks to Martin Prikryl who told me there was no error on the line Inno complained about. Tracking it down I found it was the comment that screwed the compiler up:
{ /////////////////////////////////////////////////////////
//// Messages etc }
But now I wonder if there is anything wrong with this comment?
EDIT Yes, I guess the two comment styles clashes here, see https://www.freepascal.org/docs-html/ref/refse2.html
Upvotes: 1