Difference between revisions of "While"

From MiniScript Wiki
Jump to navigation Jump to search
(Created page with "<c>while</c> is a keyword used to loop as long as some condition is true. The condition is tested before each iteration of the loop (including the firs...")
 
Line 1: Line 1:
 
<c>while</c> is a [[:Category:Keywords|keyword]] used to loop as long as some condition is true.  The condition is tested before each iteration of the loop (including the first).  When the condition is not true, execution jumps to the next statement after <c>end while</c>.
 
<c>while</c> is a [[:Category:Keywords|keyword]] used to loop as long as some condition is true.  The condition is tested before each iteration of the loop (including the first).  When the condition is not true, execution jumps to the next statement after <c>end while</c>.
  
Within the loop, execution may also jump out of the loop by using a [[break]] statement.
+
Within the loop, execution may skip directly to the next iteration with [[continue]], or jump out of the loop by using a [[break]] statement.
  
 
[[Category:Language]]
 
[[Category:Language]]

Revision as of 02:33, 20 February 2020

while is a keyword used to loop as long as some condition is true. The condition is tested before each iteration of the loop (including the first). When the condition is not true, execution jumps to the next statement after end while.

Within the loop, execution may skip directly to the next iteration with continue, or jump out of the loop by using a break statement.


This article is a stub. You can help the MiniScript Wiki by expanding it.