This snippet in a small test stack shows three ways to escape a repeat loop when the variable "endSpace" reaches 30:All three fire properly. But if I place this inside a handler in another project, only the first line escapes the repeat. Even though endSpace attains the value of 30, the other two do not, and endSpace gets to 30.1 and beyond.
How could one stack work and another not???
Craig
CODE:
on mouseup put 29.9 into endSpace repeat until endSpace / 6 = 5 --repeat until endSpace mod 6 = 0 --repeat until endSpace / 6 is an integer add 0.1 to endSpace end repeat answer endSpaceend mouseup
How could one stack work and another not???
Craig
Statistics: Posted by dunbarx — Thu Aug 01, 2024 2:51 pm