Specification of the Fore language provides for using integer expressions for the statement but the specified expression cannot be implicitly cast to the integer type.
Check the type returned by the expression used in the statement. Use explicit transformation (the As statement) or special methods returning integer values.
Sub UserProc;
Var
i: Integer;
j: Double;
Begin
For i := 0 To j Do
End For;
End Sub UserProc;
When the specified code is compiled, the following error is displayed: expression of integer type is expected. The error occurs because the "j" variable has the Double type and cannot be implicitly cast to the Integer type. To resolve the error, change the type of the "j" variable or use explicit transformation.
See also: