DEBUGIN - possible to not stop execution
John Kauffman
Posts: 653
I want a loop to keep running until a variable goes >100. The variable is filled from DEBUGIN. DEBUGIN is within the loop so that it is checked with every loop.
But the loop should keep running when the user is not entering a value. Since DEBUGIN stops execution until a value is entered, the loop runs once and then stops, witing for a new debugin value.
In other words, is there a way to over-ride the characteristic of DEBUGIN that stops the code until a value comes in?
<code>
' objective: in this SELECTCASE... CASE flash ledRed until user enters a new value for debug.
' New value can be checked through SelectCase (not shown)
CASE >150 ' temp is extremely high
DO WHILE bytTemperature > 150
DEBUGIN DEC bytTemperature
HIGH ledRed
PAUSE 500
LOW ledRed
PAUSE 500
LOOP
</code>
But the loop should keep running when the user is not entering a value. Since DEBUGIN stops execution until a value is entered, the loop runs once and then stops, witing for a new debugin value.
In other words, is there a way to over-ride the characteristic of DEBUGIN that stops the code until a value comes in?
<code>
' objective: in this SELECTCASE... CASE flash ledRed until user enters a new value for debug.
' New value can be checked through SelectCase (not shown)
CASE >150 ' temp is extremely high
DO WHILE bytTemperature > 150
DEBUGIN DEC bytTemperature
HIGH ledRed
PAUSE 500
LOW ledRed
PAUSE 500
LOOP
</code>
Comments
BTW, the proper tags to use for code blocks are [noparse] [/noparse].
-Phil
You enter the body of the DO WHILE loop by testing the CASE variable again.
Now the bytTemparature is set within the DO WHILE loop by DEBUGIN.
( Here you have the suggested option of timeout the DEBUIGIN)
You continue execution of DO WHILE loop.
If the DEBUGIN set the bytTemparature >150 the DO WHILE loop will be entered again and the DEBUGIN executed again.