Invalid Use of the <VariableName> Cycle Counter

Description

The cycle body contains an expression that changes the value of the variable that is used as the cycle counter. The value of the cycle counter is read-only.

Troubleshooting Tips

Check expressions using the variable that serves as the cycle counter.

Example

Sub UserProc;
Var
    i: Integer;
Begin
    For i := 0 To 10 Do
        i := 3;
    End For;
End Sub UserProc;

When the specified code is compiled, the string i := 3; displays the following error: Invalid use of the i cycle counter. To resolve the error, change this string so that the "i" variable was not assigned any value.

See also:

Compiler Messages