Expression cannot be Assigned to the List of Variables

Description

A default value for two or more variables is specified in the block of declaration of variables.

Troubleshooting Tips

Setting the default value is allowed only for one variable. Change the definition of variables so that the default value is assigned to each variable individually.

Example

Sub UserProc;
Var
    i, j: Integer = 1;
Begin
    
End Sub UserProc;

When the specified code is complied, the following error is generated: Expression cannot be assigned to the list of variables. To resolve the error, define each variable individually and specify the required default value.

See also:

Compiler Messages