SclConstant
Overview
The SclConstant command creates a read-only variable that may be used in preference to an explicit literal value. This helps in the development of large complex scripts where the change to a constant variable is much easier than changing all instances of a literal value for that constant in all the places that the literal value may have been used.
Synopsis
SclConstant ConstantName $Value
Description
Creates a constant called ConstantName and assigns the value to that constant. The value of ConstantName cannot be changed using the set command. After creation the constant cannot be unset although once the script terminates the constant will cease to exist.
Arguments
- ConstantName
- $Value
Passed by reference. The name of the new constant that is to be created.
Passed by value. The value that is to be assigned to the new constant. A quoted string will be required if spaces exist in the value.
Examples
# create a new constant SclConstant MYCONST 123.456