Exit of repeat with two conditions
Hi to all, what would be the best way to to write a repeat loop that I can exit based on a value condition or elapsed time condition.
This is kind of what I want
repeat
·· some code
until value==x or time_elapsed==100mS
probably simple but I can't get it
thanks in advance
Jeff T.
·
This is kind of what I want
repeat
·· some code
until value==x or time_elapsed==100mS
probably simple but I can't get it
thanks in advance
Jeff T.
·

Comments
PUB rxtime(ms) : rxbyte | t '' Wait ms milliseconds for a byte to be received '' returns -1 if no byte received, $00..$FF if byte t := cnt repeat until (rxbyte := rxcheck) => 0 or (cnt - t) / (clkfreq / 1000) > ms ?long[noparse][[/noparse]def#randomSeed]Jeff T.