Local Variable is Expected as the Cycle Counter

Description

A variable declared outside the current type member is used as a cycle counter.

Troubleshooting Tips

Use only the local variables declared within the current type member as cycle counters.

Example

Class TestClass: Object
    i: Integer;
    
    Sub Test;
    Begin
        For i := 0 To 100 Do
            
        End For;
    End Sub Test;
End Class TestClass;

When the specified code is compiled, the following error is displayed: Local variable is expected as the cycle counter. To resolve the error, transfer the description of the "i' variable to the Var block of the Test procedure.

See also:

Compiler Messages