Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!eecae!netnews.upenn.edu!rutgers!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: "for" loops Message-ID: <9521@smoke.BRL.MIL> Date: 28 Jan 89 03:58:06 GMT References: <739@jupiter.iis.UUCP> <1611@csuna.UUCP> <738@atanasoff.cs.iastate.edu> <19579@agate.BERKELEY.EDU> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 11 In article <19579@agate.BERKELEY.EDU> bowles@eris.berkeley.edu (Jeff A. Bowles) writes: >... the "for" loop is something that's really kinda nice: The main purpose of "for" in C is to collect all the loop control pieces together on a single line to make them more evident: for ( p = head.next; p != &head; p = p->next ) ... Certainly this particular can be accomplished in numerous ways, but it's hard to imagine anything that would be clearer than that.