Not logged in
Log in now
Create an account
Subscribe to LWN
Recent Features
LWN.net Weekly Edition for February 16, 2012
Book review: Open Advice
Linux support for ARM big.LITTLE
LWN.net Weekly Edition for February 9, 2012
XBMC 11 "Eden"
for (int k = 0; k < N; ++k) { /* do something */ }
It won't do them N+1 times because after the Nth iteration k is N and will fail the condition (k < N)
(Actually mine is a slightly more modern idiom, requiring C9X semantics, and it has the K&R increment style, but it amounts to the same thing)
Copyright © 2012, Eklektix, Inc. Comments and public postings are copyrighted by their creators. Linux is a registered trademark of Linus Torvalds