localNames

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
the localNames
localNames()
Summary

Returns a list of all local variables.

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Example
the localNames
repeat with x = 1 to the number of items of line 2 of the localNames
Values
NameTypeDescription
return

The localNames function returns a value consisting of three lines:

  1. Parameters passed to the current handler
  2. Local variables created in the current handler
  3. Local variables created in the current script but outside all handlers.
RelatedCommand: delete variable, local
Function: globalNames, value
Control Structure: function
Glossary: handler, declare, command, return, local variable
Description

Use the localNames function to determine which localvariables are available to the current handler, or to make sure a local variable name has not already been used before declaring it.

Local variables are created either implicitly, by putting a value into them, or explicitly with the local command. They can be deleted with the delete variable command.