unused-var - (language)
Contents
Description
unused-var prevents erroringout if <variable name> is unused; a list of variable names can be specified
separated by a comma. Generally, you don't want to have unused variables - they typically indicate bugs
or clutter. However, in some cases you might need such variables as a reminder for a future enhancement,
or for some other reason it is unavoidable. In any case, you can use unused-var to shield such instances
from causing errors.
Examples
In the following, variable "hw" is created and initialized. Such variable is not used at the moment,
however if you would do so in the future and want to keep it, use unused-var to prevent compiler errors:
set-string hw = "Hello world"
unused-var hw
Name
unused-var - (language)
Purpose
Prevent compiler error if variable is not used.
See Also
Language
inline-codestatementssyntax-highlightingunused-varvariable-scope See all documentation
$DATE $VERSION GOLF(2gg)
Syntax
unused-var <variable name> [ , ... ]
