When would you use a do while loop?
The Show Syntaxdo { The example below uses a The
statement A statement that is executed at least once and is re-executed each time the condition evaluates to true. To execute multiple statements within the loop, use a block statement ( condition An expression evaluated after each pass through the loop. If Note: Use the 0 statement to stop a loop before condition evaluates to false.In the following example, the 4 is no longer less than 5.
In some cases, it can make sense to use an assignment as a condition — but when you do, there's a right way to do it, and a wrong way; the 5 documentation has a section with an example showing a general best-practice syntax you should know about and follow. |