whati s wrong with this loop?
procedure TForm1.Button1Click(Sender: TObject);
begin
var j: Integer;
for j:=1 to 5 do
begin
ShowMessage('Box: '+InToStr(j));
end;
end.
i also added one more end; after second last end; but nothing changed. iam new to Delphi and it is frustrating:mad:
i receive the following errors
[Error] Unit1.pas(28): Statement expected but 'VAR' found
[Error] Unit1.pas(29): Declaration expected but 'FOR' found
[Error] Unit1.pas(31): Undeclared identifier: 'InToStr'
[Error] Unit1.pas(32): '.' expected but ';' found
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'