Difference between revisions of "Command:Break"

From Lavish Software Wiki
Jump to navigation Jump to search
Line 7: Line 7:
  
 
== Examples ==
 
== Examples ==
 +
Declare Count int 1
 +
Do
 +
{
 +
  Echo ${Count}
 +
  VarCalc Count ${Count}+1
 +
  break
 +
  Echo this line will not be echoed due to the above break command
 +
}
 +
While "${Count}<10"
  
 
== See Also ==
 
== See Also ==

Revision as of 21:39, 16 July 2005

Syntax

Command Difficulty Rating
Break
Usage Beginner
Level of Understanding Intermediate
Computer Savvy Beginner
Logic Intermediate

Break

Description

Used within a While loop, "breaks" the loop and continues execution after the While. Used within a Switch, "breaks" the switch and continues execution after the EndSwitch. This command is not valid at any other time.

Examples

Declare Count int 1
Do
{
  Echo ${Count}
  VarCalc Count ${Count}+1
  break
  Echo this line will not be echoed due to the above break command
}
While "${Count}<10"

See Also