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

Chapter 17. Scripting Lingo > Using Variables

Using Variables

Like most programming languages, Lingo supports both local and global variable types. Local variables exist only within the confines of a handler and are no longer available as soon as the handler ends. In most cases—in keeping with general programming principles—using local variables is the best approach, because it prevents other handlers from inadvertently modifying the variable value. There is no need to declare local variables. Before using a local variable in a handler, you need to assign a value to it; otherwise, you'll get an error message.

The following example uses a local variable.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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