Path: utzoo!censor!geac!lethe!tvcent!comspec!telly!attcan!uunet!ns-mx!iowasp.physics.uiowa.edu!ceres.physics.uiowa.edu!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!helios!bcm!shell!shell!rjohnson From: rjohnson@shell.com (Roy Johnson) Newsgroups: comp.lang.c Subject: Re: Careful "for" Loops Message-ID: Date: 26 Mar 91 20:37:35 GMT References: <15524@smoke.brl.mil><1991Mar21.181807.24059@ism.isc.com><3942.27edea2f@iccgcc.decnet.ab.com> Sender: usenet@shell.shell.com (USENET News System) Followup-To: comp.lang.c Organization: Shell Development Company, Bellaire Research Center, Houston, TX Lines: 16 In-Reply-To: browns@iccgcc.decnet.ab.com's message of 25 Mar 91 17:16:47 GMT In article <3942.27edea2f@iccgcc.decnet.ab.com> browns@iccgcc.decnet.ab.com (Stan Brown) writes: > I use > for (p=a; p Then if my loop also increments p, the loop still terminates. I would guess it would terminate before it ever went into the loop, so it doesn't matter what the loop does. 8^) > (Yes, I know my loop _shouldn't_ increment p, but sometimes I > make coding errors.) Oh. Then you meant for (p=0; p