Continue

From Wiki
Revision as of 22:14, 27 April 2006 by Snicker7 (Talk | contribs) (version info)

Jump to: navigation, search


Synopsis

continue

Description

Continue stops execution of code inside of a loop. Control is returned at the point of the next evaluation.

Example

gosub testrandom 
sub testrandom 
{ 
  for %cnt 1 10 
  { 
    if #random % 10 <> 5 
      continue 
    display ok Five has been found! 
    return 
  } 
  display ok Nothing could be found! 
  return 
} 
display ok HALT! 
halt

When random is something other than 5, the if sentence is true and therefore continue is executed. It jumps over the display and return commands and continues the for loop with it's next iteration. In the case that the evaluation is false, execution proceeds to the statement following the loop structure.

Version Info

1.5

See also

Main Page Documentation