Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Wed, 12 Sep 2012 17:04:01 -0500 Message-ID: <505106D1.10CD@mindspring.com> Date: Wed, 12 Sep 2012 18:04:01 -0400 From: pete Reply-To: pfiland@mindspring.com Organization: PF X-Mailer: Mozilla 3.04Gold (WinNT; I) MIME-Version: 1.0 Newsgroups: comp.programming Subject: Re: true loop References: <504FC54B.7D2@mindspring.com> <5875d198-0e6b-4075-94a0-d7c56a9a4386@gq8g2000vbb.googlegroups.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 31 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 4.156.228.203 X-Trace: sv3-PZio13/i44RJ9RQ0gjIf3bdHAdqhXvjt3xonnJ8UbCS9LGfNLYETYzeVTkAgDo9wGVOyVo5BIH9oSvt!DxxH2QlPA9gRz10fvugjLnq4Kwb3t19O8Z1pf95sJRJcp5ctkaGQ4CvlD+b45QC5fYS1kA1CWxFh!XJB1/Tq5oRQ= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1844 Xref: csiph.com comp.programming:2202 Nick Keighley wrote: > > On Sep 12, 12:12 am, pete wrote: > > bob wrote: > > > > > Is it considered bad practice to do something like this? > > > > > while (true) > > > { > > > ... > > > } > > > > Th C compiler which I use, > > issues a warning for that. > > > > In C, > > for(;;) > > is for writing that kind of loop. > > in what sense is it "for writing that kind of loop"? In the sense that it is only only loop style, which is explicitly described by the guy who invented it, as being an "'infinite' loop", in both editions of K&R. It's also the loop style which is used for all of the examples of "infinite" loops, in the C standard. -- pete