Please enable JavaScript to view this site.

ESL Documentation

The constant statement defines one or more constants. A constant must be defined before it is referenced. When you define a constant, you define its type by specifying the keyword integer, float, string, or boolean. If no type is specified, the constant is a string by default.

For example:

 

integer constant Max_Retries is 3 Max_Timeout is 5

 

Regardless of the constant type, you cannot omit the keyword constant.

The type that you specify for a constant determines the type of value required for the initialization. Wherever an integer or floating point value is expected, you can use a negative value, such as -3 or -4.03. Wherever a boolean value is expected, you can specify a negative boolean, such as:

 

boolean constant SystemOff is

    (not SystemOn)

 

where SystemOn is a boolean value.