From Xojo Documentation
|You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!|
You can get an infinite loop if you use a limited Integer type (UInt32 or UInt8) and your loop end value reach the minimum or maximum size of the Integer. In order for a loop to exit the counter, it has to go beyond the bounds of the loop's specified end value. For example if your end value is 0, but you used an UInt8 which has a minimum value of 0, then your loop counter can never be below 0 (it wraps to 255) and you will have an infinite loop.
Count down to 1: