Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84 (Fortune 01.1b1); site graffiti.UUCP
Path: utzoo!watmath!clyde!bonnie!akgua!gatech!seismo!ut-sally!ut-ngp!shell!graffiti!peter
From: peter@graffiti.UUCP (Peter da Silva)
Newsgroups: net.lang.c
Subject: Re: "C" wish list/for(;;) loop
Message-ID: <427@graffiti.UUCP>
Date: Sun, 10-Nov-85 13:04:35 EST
Article-I.D.: graffiti.427
Posted: Sun Nov 10 13:04:35 1985
Date-Received: Wed, 13-Nov-85 07:46:07 EST
References: <814@asgb.UUCP>
Organization: The Power Elite, Houston, TX
Lines: 40

>   One thing that should be changed for consistency reasons is
> to get rid of  "for(;;)" meaning "endless loop".  This is the
> exception to the equivalence of "for" with "while".  And, after
> all, why should a null expression be considered TRUE?

Are you talking about the similarity between this...

	for(init;test;increment)
		statement;

...and this...

	init;
	while(test) {
		statement;
		increment;
	}

...?

Let's make init "i=0", test "i<10", increment "i++", and statement "continue".
This gives us...

	for(i=0; i<10; i++)
		continue;

...and...

	i=0;
	while(i<10) {
		continue;
		i++;
	}

...for our two statements. The former terminates. The latter doesn't.
-- 
Name: Peter da Silva
Graphic: `-_-'
UUCP: ...!shell!{graffiti,baylor}!peter
IAEF: ...!kitty!baylor!peter