Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.pascal.borland    |    Borland Pascal was actually pretty neat    |    2,978 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 1,824 of 2,978    |
|    HansO to N. Foldager    |
|    Re: For-to variable goes backwards    |
|    12 Jul 05 19:37:59    |
   
   From: msxhans@yahoo.com   
      
   N. Foldager wrote:   
      
   >   
   >   
   >When I step through a for- to loop like:   
   >   
   >for I =: 1 to 10 do   
   >   
   >the variable, I, actually starts with 10 and counts down instead of   
   >up. This is a known; it should be due to some optimization.   
   >   
   >But why is this more optimal in the generated code?   
   >   
   >Is there a way to switch this optimization off as long as I am   
   >debugging my program?   
   >   
   >It is *most* disturbing during debugging.   
   >   
   >   
      
   Please show us some more code. Sure the loop variable is what is decremented?   
   When executing the loop variable must start with the first value and then be   
   incremented until the end condition is met!   
      
   program test ;   
      
   var   
      
    I : integer   
      
   begin   
    for I := 1 to 10 do   
    writeln (I) ;   
   end.   
   will surely show the numers 1 to 10 printed on separate lines.   
   Hans, http://www.hansotten.com   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca