Reputation: 57
I am having trouble using the Inc and Dec procedures in Delphi 2010.
Here's a snippet of my code:
if NOT(frmMain.Height = 0) then
begin
Dec(frmMain.Height, 2);
Inc(frmMain.Top);
end;
And I get a:
[DCC Error] frmMain_U.pas(44): E2064 Left side cannot be assigned to
Any ideas? I have a feeling I might be missing something stupid here...
EDIT: Read up on procedures here:
http://www.delphibasics.co.uk/RTL.asp?Name=Inc
http://www.delphibasics.co.uk/RTL.asp?Name=Dec
Upvotes: 3
Views: 775
Reputation: 612794
You can only use inc and dec with variables. You are passing properties instead and they are not variables.
Upvotes: 8