Code: Select all
Let>vSkip=False
Let>vTemp=XX
Let>k=0
Repeat>k
Let>k=k+1
Message>k = %k%
/*
// While>vSkip=True
// If>%vTemp%=*/
// MessageModal>in While Loop
// GoTo>Finish
// EndIf
// Message>While is over
GoTo>Good
// EndWhile
*/
Message>Next Until is a problem
Label>Good
Until>k>3
Label>Finish
MessageModal>DONE. k = %k%
Running with normal lines produces error message.
So, I tried to comment out the While loop
If I put "//" in front of all the lines, the script failed.
If I add "/*" and "*/" around the "// lines, the script is OK
If I Single Step through the code, it jumps to // MessageModal>inWhileLoop vs. skipping commented lines.
If I Single Step using only /*....*/ and no // lines, it jumps to MessageModal and GOTO lines, skipping the Until completely.
So, a few questions:
1. Is there any reason I cannot use a While loop inside a Repeat..Until loop?
2. Why does the flow go to the commented line in the middle?
3. How to modify the syntax to allow the While inside the Repeat?
4. The actual While loop has many lines that get executed. The normal state of While looptests is False on both If commands, why does Single Step go through the lines when block is commented out?