Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

[Solved - RTFM] Unable to modify the loop control TO variable

$
0
0
Good Evening,

Consider the following code
[ autoit ]      
local $slen = 5 for $1 = 1 to $slen     ConsoleWrite('Loop # ' & $1 & ' $slen = ' & $slen & @LF)     if $1 = 2 then $slen += 2 next

The variable ($slen) gets incremented but the loop only runs 5 times, expected 7 times.  Because the increment control variable can be modified I expected to be able to modify the loop exit variable.  Can someone verify whether or not loop exit control can be modified?

kylomas

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>