Unused var

Purpose: Prevent compiler error if variable is not used.

 unused-var <variable name>

unused-var prevents erroring out if <variable name> is unused. 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

See also
Language
inline-code  
statements  
syntax-highlighting  
unused-var  
variable-scope  
See all
documentation


Copyright (c) 2019-2024 Gliim LLC. All contents on this web site is "AS IS" without warranties or guarantees of any kind.