: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.

A script variable's name is limited to 32 alphanumeric characters, including the special characters "$", "_", "@", "ยง" and "#". German Umlauts are not allowed. The first character must not be a number. Variables within the script must always specified with a leading "&" following the variable name!

Format: script variable

Value

The value of the constant.
Format: script literal, script variable or script function

This value cannot be changed subsequently.

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 the :SET script statement, the values of constants are write-protected and cannot be changed subsequently.

Warning! Note that you cannot use this script element in order to convert an existing script variable to a constant. This includes that you cannot use a name of an existing variable.

Warning! You cannot create a constant with the :DEFINE script statement. This includes that they do not have a certain data type.

Warning! Please note that the :CONST script statement automatically rounds floating-point numbers up or down. To save floating-point numbers, please use :DEFINE.

Examples

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

See also:

seealso

:DEFINE

seealso1

RESOLVE_VAR