Command:Case
Contents
Syntax
Case | |
Usage | Intermediate |
Level of Understanding | Intermediate |
Computer Savvy | Beginner |
Logic | Intermediate |
Case <text>
Description
Used within a Switch, this marks the beginning of what should be executed if the text matches what was given to Switch.
Examples
Switch "${Crayon.Color}" {
case Red echo "You picked the Red crayon" break case Yellow echo "You picked the Yellow crayon" break case "Burnt Sienna" echo "You picked the Burnt Sienna crayon" break Default echo "Please pick Red, Yellow, or Burnt Sienna" break
} EndSwitch