Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #2202

Re: true loop

Message-ID <505106D1.10CD@mindspring.com> (permalink)
Date 2012-09-12 18:04 -0400
From pete <pfiland@mindspring.com>
Organization PF
Newsgroups comp.programming
Subject Re: true loop
References <d7cd0c38-525c-4796-98e4-4a068d91846c@googlegroups.com> <504FC54B.7D2@mindspring.com> <5875d198-0e6b-4075-94a0-d7c56a9a4386@gq8g2000vbb.googlegroups.com>

Show all headers | View raw


Nick Keighley wrote:
> 
> On Sep 12, 12:12 am, pete <pfil...@mindspring.com> 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

Back to comp.programming | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

true loop bob <bob@coolfone.comze.com> - 2012-09-11 10:52 -0700
  Re: true loop Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-09-11 11:17 -0700
  Re: true loop pete <pfiland@mindspring.com> - 2012-09-11 19:12 -0400
    Re: true loop Patricia Shanahan <pats@acm.org> - 2012-09-11 16:28 -0700
      Re: true loop pete <pfiland@mindspring.com> - 2012-09-11 22:23 -0400
      Re: true loop Geoff <geoff@invalid.invalid> - 2012-09-11 19:33 -0700
        Re: true loop Patricia Shanahan <pats@acm.org> - 2012-09-11 19:53 -0700
        Re: true loop Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-09-12 02:23 -0700
      Re: true loop "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2012-09-15 10:56 +0100
    Re: true loop Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-09-12 02:21 -0700
      Re: true loop pete <pfiland@mindspring.com> - 2012-09-12 18:04 -0400
        Re: true loop Ian Collins <ian-news@hotmail.com> - 2012-09-13 10:22 +1200
          Re: true loop Geoff <geoff@invalid.invalid> - 2012-09-12 19:06 -0700
  Re: true loop Mok-Kong Shen <mok-kong.shen@t-online.de> - 2012-09-13 16:27 +0200
    Re: true loop Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-09-19 07:04 -0700
      Re: true loop Patricia Shanahan <pats@acm.org> - 2012-09-19 07:30 -0700

csiph-web