[fpc-devel]bug 3272

Kris Herlaar kris at theredhead.nl
Wed Nov 17 01:12:33 CET 2004


You cannot use "to" when iterating downwards in pascal, but should be 
using DownTo like so:

program  bug3272;

var i: integer;
begin
  for i:= -1 downto -2 do
     writeln (i);
  writeln;
  for i:= 1 downto 0 do
     writeln (i);
end.

Yes, i know this is kinda old and probably solved 100 times before, but 
i just subscribed and had to see it in action somehow ;-)


 > Hi!
 > Can someone solve this heavy bug below.
 > Thanks!
 >
 > program  bug3272;
 >
 > var i: integer;
 > begin
 >  for i:= -1 to -2 do
 >     writeln (i);
 >  writeln;
 >  for i:= 1 to 0 do
 >     writeln (i);
 > end.





More information about the fpc-devel mailing list