Advertisement
lesharb

Example Error For

Aug 11th, 2011
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.37 KB | None | 0 0
  1. procedure TForm1.FormDblClick(Sender: TObject);
  2. var
  3.   K1: Integer;
  4.   K2: Double;
  5.   Sum: Double;
  6. begin
  7.   Sum := 0;
  8.   for K1 := 0 to 9 do
  9.     Sum := Sum   K1;
  10.   ShowMessage(FloatToStr(Sum));
  11.   Sum := 0;
  12.   for K2 := 0 to 9 do
  13.     Sum := Sum   K2;
  14.   ShowMessage(FloatToStr(Sum));
  15. end;
  16.  
  17. [DCC Error] Unit1.pas(36): E2032 For loop control variable must have ordinal type
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement