Error, final value in for loop must be numeric or character
|
Description
|
|
The terminal condition in a for loop must be a numeric value, except when iterating over the letters in a string where a character is accepted.
|
|
Examples
|
|
Example 1
Note that has no value.
>
|
|
Solution:
Define to correct this error.
>
|
|
| (2.1) |
>
|
|
| (2.2) |
Example 2
In this example is set to where has no value.
>
|
|
>
|
|
Solution:
As with the previous example, define to correct this error.
>
|
|
| (2.3) |
>
|
|
| (2.4) |
Example 3
Here is not initialized to a numeric value.
>
|
|
Solution:
Initialize
>
|
|
| (2.5) |
>
|
|
| (2.6) |
|
|
Download Help Document
Was this information helpful?