global | |||||||
Type | command | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Summary | |||||||
Introduced | 1.0 | ||||||
OS | mac, windows, linux, ios, android | ||||||
Platforms | desktop, server, mobile | ||||||
Parameters |
| ||||||
Example |
| ||||||
Related | Property: script Command: global, local Function: globalNames, value Glossary: variable, handler, global, statement, local variable, declare, command | ||||||
Description | Use the global command to define a variable that can be used in any handler, and which retains its value between handlers. You can place the global command either in a handler, or in a script but outside any handler in the script:
The global command can appear anywhere in a handler, as long as it's before the first statement in which the global variable is used. However, to make them easier to find, all global declarations are usually placed at the beginning of a handler :
Such global commands are usually placed at the beginning of the script, before any handlers, to make them easy to find: | ||||||
Tags | properties |