Closed zastress closed 4 months ago
Hi,
thank you for reporting the issue.
The incident has nothing to do with the FOR loop. The variable is only determined during runtime, thus it is impossible to predict the variable name statically. The code must be executed in order to know the variable name.
Given that the usecase for this feature is likely and edge case and the correctness of the variable name would have to be "guessed" (and thus predicted wrong), effort would not justify the means and risks.
Regards
If you write something like this, and you know that it is correct code for Robot, but RobotCode says there is an error, you can tell RobotCode that it should ignore this error by adding a comment at the end of the line # robotcode: ignore
There is also a QuickFix for this, set the cursor to the variable name and click the yellow light bulb.
Thank you for the response, Daniel. I just added #robotcode: ignore
. I don't need to create a new variable because that is actually declared inside the FOR loop.
Is your enhancement request related to a problem? Please describe. Variables that return from a FOR loop are not recognized further if the initial declaration was nested
Example