Hi, I have a while loop that has the condition “while A=True”. Now I would like that if the process comes to the while loop and A=False it should do nothing within the loop (skip instead of doing once). How could I achieve that? It is within a longer sequence so I would like to avoid changing the structure completely. An if statement over the whole loop is also not readable.Thanks for suggestions
The While A=True will execute the loop while the condition is true. Otherwise, it will skip the loop.
While(A=True):
Statement1;
Statement2;
.
.
Statementn;
Okay, so the while loop ends immediately without doing the whole process once. Thanks
The Do While loop is different. It will execute first the loop conditions, and then will check if the condtion is true or not.
The While loop checks first if the condition is true or not, and then will execute the body depending on your condition.
Okay, thanks a lot. That’s what I was confused about.
My second question would be if there is something like a “break” activity for the while loop.
This answer your question
So there is no workaround here?
I am not sure, but i think there is no way to break a loop. You can do a break by throwing it to an exeption with a Throw activity.
Well, would have been a nice freature. Thanks for the information.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.