Command:Break

From Lavish Software Wiki
Revision as of 21:42, 7 September 2005 by Lax (talk | contribs)
Jump to navigation Jump to search

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}
  break
  Echo this line will not be echoed due to the above break command and the loop will stop
}
While "${Count:Inc}<10"
; Count below will display as 2 beacause we broke out of the loop on the first iteration
Echo ${Count}

See Also