Jump to content

Request - program loop Break On


larryllix

Recommended Posts

Posted

It would be nice to have more than one way of orderly terminating a repeat  loop. Having another program terminate the repeat from a condition can sometimes stop a program, where one does not want it stopped, with some unfinished business.

This could replace the missing OR/AND/ NOT  logic in Repeat construct conditions.

 

eg.

Repeat for 10 times
    Do something
    Do something else
    Break on status SwitchLinc1 is On
    Do a third thing
    Break on status SwitchLinc2 is On

Repeat 1 time
   Do something based on both lights on

 

$Counter = 12
Repeat While SwitchLinc1 is On
    Run (if) FlashProgram
   $Counter -= 1
    Break on $Counter <= 0
Repeat 1 Times


    


 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...