-
My code is searching for an entry in a 2-dimensional grid, and I when I find the first match, I want to break out of the loops, retaining the coordinates of the match. So I used what I thought was a fairly standard C pattern, but the results were weird. I've reproduced the behaviour in the simplified example below: ` void main() {
} Resulting output is: I would have expected: Is this a known bug, or am I just confused about the way I think C should work? I fixed my code to work in a different way, but I thought I'd ask the community for their comments. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, |
Beta Was this translation helpful? Give feedback.
Hi,
cc65 behaves correctly here. Your 2d
if
statement should be moved one line down for it to work as intended.