for loop executes once when condition is already met #1206
Closed
kanishka-karan
started this conversation in
General
Replies: 1 comment 1 reply
-
it seems there is a bug. i created a issue from this discussion |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
We are using decrement for loop :
The output of the program is :
It shows that the for loop code is executing once even if
end
is equal to -1. We think it should not run the code insidefor
loop, as the condition is not met.We interpreted the Structured text for loop
as in C/C++ as
Please let us know if we our understanding is correct.
Thank You
Beta Was this translation helpful? Give feedback.
All reactions