Write Short Notes on the following
(1) Repeat Until Block
Share
Write Short Notes on the following
(1) Repeat Until Block
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Answer:
The Repeat Until () block is a Control block and a C block. Blocks held inside this block will loop until the specified boolean statement is true, in which case the code beneath the block (if any) will execute. This loop is in similar nature to a while loop in some other programming languages.
Example Uses
As this block loops pieces of code until a condition is true, the block is the best way to run code until a desired condition has been reached. Some common uses:
Moving a sprite until its X or Y position is at a certain amount