Lingo Dictionary > O-R > otherwise |
![]() ![]() ![]() |
otherwise
Syntax
otherwise
statement(s)
Description
Keyword; precedes instructions that Lingo performs when none of the earlier conditions in a case
statement are met.
This keyword can be used to alert users of out-of-bound input or invalid type, and can be very helpful in debugging during development.
Example
The following handler tests which key the user pressed most recently and responds accordingly:
![]() |
If the user pressed A, B, or C, the movie performs the corresponding action following the |
![]() |
If the user pressed any other key, the movie executes the statement that follows the |
on keyDown case (the key) of "A": go to frame "Apple" "B", "C": puppetTransition 99 go to frame "Oranges" otherwise: alert "That is not a valid key." end case end keyDown |
![]() ![]() ![]() |