Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 12
    This is so easy to misuse when your array suddently becomes heap-allocated... Commented Jul 16, 2010 at 14:08
  • 2
    @Alexandre C. just as easy to misuse as the manual sizeof-with-forloop way. I suspect one better double checks all actions in C :) Commented Jul 16, 2010 at 15:06
  • Yes, my comment was directed to the idiom, not to the macro. Commented Jul 16, 2010 at 15:09
  • What is the purpose of the keep variable, and why does foreach expand to a nested for loop? Commented Jul 22, 2015 at 21:25
  • 1
    @ToddLehman the purpose is to make break work (and my code was broken. I thought I copied it from a different answer of me, but apparently I wasn't quite enough awake :p. I fixed it, please double-check) Commented Jul 26, 2015 at 12:38