Constant Expression is Expected

Description

According to the Fore language specification, one can use specific values or previously defined constants when defining constants in an expression.

Troubleshooting Tips

Remove the function call and reference to fields and properties from the expression used to declare the value of the constant.

Example

Sub UserProc;
Const
    i = Integer.MaxValue;
Begin
    
End Sub UserProc;

When the specified code is compiled, the following error is displayed: Constant expression is expected. To resolve the error, remove the link to the MaxValue property from the description of the "i" constant and specify a certain value.

See also:

Compiler Messages