Not logged in
Log in now
Create an account
Subscribe to LWN
Recent Features
LWN.net Weekly Edition for February 9, 2012
XBMC 11 "Eden"
LWN.net Weekly Edition for February 2, 2012
A tempest in a toybox
LWN.net Weekly Edition for January 26, 2012
Btrfs aims for the mainline
Posted Jan 7, 2009 23:28 UTC (Wed) by tialaramex (subscriber, #21167) [Link]
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