Multiple Definition of Constant

Description

More than one Case block is specified in the Select Case selection statement to check a constant value.

Troubleshooting Tips

Delete duplicate Case blocks or change the checked value in a duplicate block.

Example

Sub UserProc;
Var
    i: Integer;
Begin
    Select Case i
        Case 1 To 9//Actions
        Case 3//Actions
    End Select;
End Sub UserProc;

When the specified code is compiled, the string Case 3: displays the following error: Multiple definition of constant. This error occurs because the value 3 falls into the range [1:9] checked in another Case block. To resolve the error, either delete the block Case 3: or change the value checked in this block.

See also:

Compiler Messages