• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Lesson 22. Optimizing Scripts > Using Symbols in a case Statement

Using Symbols in a case Statement

A case structure is an efficient means of handling situations in which multiple actions can occur, depending on changing conditions, but when reading the script you just wrote, it's hard to remember just what the differences are among cases 1, 2, 3, and 4. Lingo offers an easy way to make your code more readable. Instead of case numbers, you can use symbols, a special kind of Lingo data type, analogous to a string, number, or other value.

All symbol names must begin with a pound sign (#) for Lingo to recognize them as symbols. Symbols can be used as variable names and can be compared to other data (for example, using =). Symbols can also be passed as parameters to handlers, and handlers can return them as values.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint