Error, controlling variable of for loop must be a name
The for name clause specifies the for loop's control variable. The name may be any expression for which the type(expr, name) command returns a value of true.
This error message occurs when the control variable used in the for loop is not of type name, that is, expressions for which the type(expr, name) command returns a value of false.
In this case, the control variable has been omitted.
for from 6 by 2 to 10 doprintiend do
The name i has been designated as the control variable.
for i from 6 by 2 to 10 doprintiend do
This error occurs because the specified controlling variable is not a name.
for sinx from 1 to 10 do total≔total+2 end do:
Replace sinx with an expression for which type(expr, name) returns true. For example, replacing sinx with x corrects the error.
for x from 1 to 10 do total≔total+2 end do:
repetition statements in the programming guide, type/name
Download Help Document
What kind of issue would you like to report? (Optional)