Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!umcp-cs!chris From: chris@umcp-cs.UUCP (Chris Torek) Newsgroups: net.lang.c Subject: Re: Infinite loops Message-ID: <961@umcp-cs.UUCP> Date: Wed, 16-Apr-86 17:41:58 EST Article-I.D.: umcp-cs.961 Posted: Wed Apr 16 17:41:58 1986 Date-Received: Fri, 18-Apr-86 09:00:47 EST References: <577@ur-helheim.UUCP> Reply-To: chris@maryland.UUCP (Chris Torek) Organization: University of Maryland, Dept. of Computer Sci. Lines: 21 In article <577@ur-helheim.UUCP> badri@ur-helheim.UUCP (Badri Lokanathan) writes: >There are several ways of creating infinite loops: Namely, `while (1)' and `for (;;)'. (There are others, but these seem to be the nominal standard.) >... is there any reason (other than personal preferance) why one >would prefer to use any particular form? Some compilers generate a `test the constant 1' for the former sequence, and no test for the latter; but I imagine that by now this is rather rare. >I personally prefer the while(1) form since it seems to make better reading. Oddly enough, I prefer the other form, but for the same reason. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 1415) UUCP: seismo!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris@mimsy.umd.edu