Advertisement
WarPie90

Untitled

Dec 15th, 2015
337
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.71 KB | None | 0 0
  1. {$x+}
  2. begin
  3.   for var i:=0 in [1..3] to True do
  4.     WriteLn(i);
  5.   //False
  6.   //True
  7. end;    
  8.  
  9.  
  10. {$x+}
  11. begin
  12.   for var i:Int32 in [1..3] do
  13.     WriteLn(i);
  14.   //1
  15.   //2
  16.   //3
  17. end;  
  18.  
  19.  
  20. {$x+}
  21. begin
  22.   for var i:=0 in [1..3] do
  23.     WriteLn(i);
  24.   //Compilation error: "Found unexpected token "Do" at line 3, column 27"
  25. end;
  26.  
  27. //==========| not extended |==========//
  28.  
  29. var i:Int32;
  30. begin
  31.   for i in [1..3] do
  32.     WriteLn(i);
  33.   //1
  34.   //2
  35.   //3
  36. end;
  37.  
  38.  
  39. var b:Boolean;
  40. begin
  41.   for b:=0 in [1..3] to True do
  42.     WriteLn(b);
  43.   //False
  44.   //True
  45. end;    
  46.  
  47.  
  48. var i:Int32;
  49. begin
  50.   for i:=0 in [1..3] do
  51.     WriteLn(i);
  52.   //Compilation error: "Variable expected at line 3, column 23"
  53. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement