:CONST, :CONSTANT

Script Statement: Creates a script variable as a constant with a specific value.

Syntax

:C[ONST[ANT]] Variable name = Value

Syntax

Description/Format

Variable name

The name of the script variable that should be defined as a constant.

You must always use an ampersand symbol (&) that precedes the script variable's name, and it is recommended that you use a hash (#) symbol to signal the end of the variable's name.

The length of a script variable's name is limited to 32 characters. All characters of the alphabet, the numbers 0-9, and the following special characters can be used:"$", "_", "@", "ยง" and "#". German Umlauts are not allowed. The first character after the leading "&", which is not part of the 32-character limit, must neither be a number nor a "$" symbol.

For more details about the syntax, see Syntax

Format: script variable

Value

The value of the constant.

Format: script literal, script variable or script function

This value cannot be changed subsequently.

Comments

This script element creates a new variable as a constant and assigns a specific value to it. As opposed to variables that you create with :SET, the values of constants are write-protected and cannot be changed subsequently.

Important!

Examples

:CONST &COMPANY# = "CA Technologies"
:CONST &PI# = 3.1415

See also:

Script Element Description
:DEFINE Define a variable and declares the data type of the variable.

:PSET

Assigns a value to an object variable.

:SET

Assigns a value to a script variable.

:SET_SCRIPT_VAR

Sets the values of script variables by indirect access.