how to repeat while one of n statements is true
youngdave
Posts: 70
Dear All
Is the following type of thing possible in Spin?
repeat while diff_x > previous_diff_x
or
repeat while diff_y > previous_diff_y
or maybe
repeat while diff_x > previous_diff_x or diff_y > previous_diff_y
TIA David Young
Is the following type of thing possible in Spin?
repeat while diff_x > previous_diff_x
or
repeat while diff_y > previous_diff_y
or maybe
repeat while diff_x > previous_diff_x or diff_y > previous_diff_y
TIA David Young
Comments
Of course, withing the repeat while structure you need to update the variables being used in the condition so that you can break free of the loop. You may want to add parenthesis to make your intentions absolutely clear:
Post Edited (JonnyMac) : 9/4/2009 11:16:26 PM GMT
is perfectly acceptable