我是一個新來的Delphi,並試圖編譯Inno Setup的Setup.e32
文件,使用Inno Setup的源代碼和Delphi 10.1柏林。編譯錯誤:[dcc32錯誤] E2064左側不能分配
但問題是,當我嘗試編譯,我不斷收到錯誤[dcc32 Error] uPSUtils.pas(944): E2064 Left side cannot be assigned to.
我不知道如何解決這一點,也閱讀了本網站的問題,其詢問了錯誤,但即使無法確定此代碼中的錯誤。
代碼的各個部分:
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;
有什麼不對這些代碼?
當我創建並單擊compile.bat
編譯非Unicode Inno Setup(現在我安裝了Delphi 7 .............),這就是發生了什麼。
非常感謝您........經過艱苦的搜索後,我現在正在下載這個文件:CodeGearRADStudio2007_Dec2007.iso'。我可以使用這個RAD Studio 2007編譯這個文件嗎?我什至不能確定這個文件是什麼,因爲德爾福2007年現在已經結束了.....我只是下載來檢查。 :( – GTAVLover
在我看來,像德爾福那樣老,這些模塊中的一些更好。 –
或者我應該停止這個並下載它?這看起來像'德爾福2009年更新3'。鏈接:http://altd.embarcadero。com/download/Delphi_C++ Builder2009/Delphi_C++ Builder2009_ISO_June2009.iso我認爲這必須工作,因爲JR軟件說這是預期的編譯器。 – GTAVLover