Without further telling any background story, let’s start decoding loops in PAD.
Exit Loop
Exit loop terminates the loop and the flow resumes at the next action or statement following the loop. In below screenshot, we can see that I have inserted exit loop inside for each loop. Ideally, this for each loop should display message twice. But because of exit action it will display message once and will directly jump into next step.
Exit Loop Action
We can use conditional exit as well if required. We can put the exit action under If condition block as shown in below picture.
Condition Exit Loop Action
Loop Condition
Loop condition iterates a block of actions as long as the specified condition proves to be true. It’s similar to the while loop we use in our programming and development.
Loop Condition Action
Example
Loop Condition Example
In above example, initially I am setting a variable i is equal to 0. After that I am increasing the variable i value by 1 inside the loop. This loop will pop up display message five times having 0,1,2,3 and 4 respectively.
Loop Condition Action Setting
Next Loop Action
This action forces the next iteration of the block to take place, skipping any actions in between.
Next Loop Example
In Above example, the display message will never pop up because it will jump to End action.
Hope you all will like this article on decoding loops in PAD. Cheers !!
When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.
DisagreeAgree
Connect with
I allow to create an account
When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.
DisagreeAgree
1 Comment
Oldest
NewestMost Voted
Inline Feedbacks
View all comments
artikelpendidikan.id
4 years ago
Hey There. I found your blog using msn. This is a very well written article.
I’ll make sure to bookmark it and come back to read
more of your useful info. Thanks for the post. I’ll certainly comeback.
Hey There. I found your blog using msn. This is a very well written article.
I’ll make sure to bookmark it and come back to read
more of your useful info. Thanks for the post. I’ll certainly comeback.