I an new to Delphi and tried to compile Inno Setup's Setup.e32
file using Inno Setup's Source Code with Delphi 10.1 Berlin.
But the problem is when I try to compile, I keeps getting Error [dcc32 Error] uPSUtils.pas(944): E2064 Left side cannot be assigned to.
I don't know how to resolve this and also read questions in this site which asked about that Error but even can't determine what is wrong in this code.
The Parts of the Code:
function FastUpperCase(const s: String): string;
{Fast uppercase}
var
I: Integer;
C: Char;
begin
Result := S;
I := Length(Result);
while I > 0 do
begin
C := Result[I];
if c in [#97..#122] then
Dec (Byte(Result[I]), 32); <<<Error E2064 HERE>>>
Dec(I);
end;
end;
function FastLowerCase(const s: String): string;
{Fast lowercase}
var
I: Integer;
C: Char;
begin
Result := S;
I := Length(Result);
while I > 0 do
begin
C := Result[I];
if C in [#65..#90] then
Inc(Byte(Result[I]), 32); <<<ERROR E2064 HERE>>>
Dec(I);
end;
end;
function ParseToken(var CurrTokenPos, CurrTokenLen: Cardinal; var CurrTokenId: TPSPasToken): TPSParserErrorKind;
{Parse the token}
var
ct, ci: Cardinal;
hs: Boolean;
p: PChar;
begin
ParseToken := iNoError;
ct := CurrTokenPos;
case FText[ct] of
#0:
begin
CurrTokenId := CSTI_EOF;
CurrTokenLen := 0;
end;
'A'..'Z', 'a'..'z', '_':
begin
ci := ct + 1;
while (FText[ci] in ['_', '0'..'9', 'a'..'z', 'A'..'Z']) do begin
Inc(ci);
end;
CurrTokenLen := ci - ct;
FLastUpToken := GetToken(CurrTokenPos, CurrtokenLen);
p := pchar(FLastUpToken);
while p^<>#0 do
begin
if p^ in [#97..#122] then
Dec ((Byte(p^)), 32); <<<ERROR E2064 HERE>>>
inc(p);
end;
if not CheckReserved(FLastUpToken, CurrTokenId) then
begin
CurrTokenId := CSTI_Identifier;
end;
end;
What is wrong in these codes?
After I created compilesettings.bat
and Clicked on compile.bat
to Compile non Unicode Inno Setup (As now I installed Delphi 7.............) , this is what happened.