Wiki

Changes between Version 3 and Version 4 of WhileStatement

Show
Ignore:
Timestamp:
12/23/10 09:05:56 (7 years ago)
Author:
hopscc
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WhileStatement

    v3 v4  
    11= While Statement = 
    2 The '''while''' statement is used to repeatedly execute code while a condition is true. 
     2Repeatedly execute code while a condition is true.[[BR]] 
     3Evaluate the condition either before executing the code ( the first time) or afterwards. 
    34=== Grammar === 
    45{{{ 
     
    910 
    1011Without the '''post''', the expression is first evaluated and while true, the statements are executed. [[BR]] 
    11 If the expression evaluates false the first time, the statements will not execute.  
     12If the expression evaluates false the first time, the statements will not be executed.  
    1213 
    1314With  '''post''', the condition is evaluated after the statements execute, so the statements will execute at least once. 
    1415 
    15 Inside the statements, a '''break''' statement will exit the loop and a '''continue''' statement will skip the remaining statements and evaluate the expression again. In either case, an '''if''' statement should be used to control when the loop is broken or continued (otherwise it would be pointless to have further statements in the loop). 
     16Inside the statements, a '''break''' statement will exit the loop and a '''continue''' statement will skip the remaining statements and  
     17cause evaluation of the expression again. In either case, an '''if''' statement should be used to control when the loop is broken or continued (otherwise it would be pointless to have further statements in the loop). 
    1618 
    1719{{{