Actually, to reveal the true issue, try this:

repeat with n = 0 to 1 step 0.1
put n & tab & (n - 1) * 100000000000 & return after aList
end repeat
put aList into fld 1

Rounding error. On the second-to-last iteration, Rev doesn't think it's quite reached "1" yet, so it goes through the loop one more time.

<[email protected]> wrote in message news:[email protected]...
Bug in last post;

But going from -1 to 1 (or -1 to 0 or 0 to -1) gives 12 interations, one
extra. --either 22 or 12, not 21 or 11. Anyway, one extra.

An extra iteration is performed if 0 is within the range of the loop
counter. It seems that when the counter reaches its max value, if 0 was in the range, the max value is run one more time. For the example of 0 to 1, the 1 is
looped twice.

"Schwartz, Jonathan L." <[email protected]> wrote in message news:[email protected]...
Has anyone had a problem with the following?

on mouseUp
  repeat with n = 0 to 1 step 0.1
     put n&"," after aList
  end repeat
  put aList
end mouseUp

Returns
0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,1.1,



_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to