explicitVariables

Typeproperty
DictionaryLCS
LibraryLiveCode Script
Syntax
set the explicitVariables to {true | false}
Synonymsexplicitvars
Summary

Specifies that local variables must be explicitly declared with the local command.

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Example
set the explicitVariables to true
Values
NameTypeDescription
Value

The explicitVariables is true or false. By default, the explicitVariables is set to false.

RelatedCommand: local
Glossary: property, compile error, variable, literal string, local variable, declare, debug, command, behavior
Description

Set the explicitVariables property to aid in debugging your code.

Setting the explicitVariables property to true can help you debug certain problems with variables.

If the explicitVariables is true, using a local variable without declaring it first causes a compile error. This behavior can be useful in tracking down certain subtle problems such as misspelling a variable name.

If the explicitVariables property is true, using a literal string without enclosing it in quotes causes a compile error.

Note: ExplicitVariables only come into effect when script is compiled, such as in do, value and setting the script. Its value should be preserved outside of user handlers, only setting it around syntax to which it applies.

Tagsproperties