Difference between revisions of "Command:EndSwitch"

From Lavish Software Wiki
Jump to navigation Jump to search
Line 7: Line 7:
  
 
== Examples ==
 
== Examples ==
 +
 +
Switch ${Fruit.Color}
 +
{
 +
  case Red
 +
    echo Is the fruit a strawberry?
 +
    break
 +
  case Blue
 +
    echo Is the fruit a blueberry?
 +
    break
 +
  case Yellow
 +
    echo Is the fruit a banana?
 +
    break
 +
  Default
 +
    echo I don't know what kind of fruit might be ${Fruit.Color}!
 +
    break
 +
}
 +
EndSwitch
  
 
== See Also ==
 
== See Also ==

Revision as of 17:08, 24 August 2005

Syntax

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

EndSwitch

Description

Used with Switch, this marks the end of the switch.

Examples

Switch ${Fruit.Color}
{
  case Red
    echo Is the fruit a strawberry?
    break
  case Blue
    echo Is the fruit a blueberry?
    break
  case Yellow
    echo Is the fruit a banana?
    break
  Default
    echo I don't know what kind of fruit might be ${Fruit.Color}!
    break
}
EndSwitch

See Also