develooper Front page | perl.perl5.porters | Postings from July 2000

while () and for (;;)

Thread Next
From:
Jeff Pinyan
Date:
July 28, 2000 11:46
Subject:
while () and for (;;)
Message ID:
Pine.GSO.4.21.0007281445190.4304-100000@crusoe.crusoe.net
Just why IS the empty statement?  Was C the first language to insitute
this, and if so, why is it the way it is?

  for (;;) { ... }

and

  while () { ... }

loop forever, but I'm not sure I REALLY understand why.  I'd be much
happier with

  for (;1;) { ... }

and

  while (1) { ... }

-- 
Jeff "japhy" Pinyan     japhy@pobox.com     http://www.pobox.com/~japhy/
PerlMonth - An Online Perl Magazine            http://www.perlmonth.com/
The Perl Archive - Articles, Forums, etc.    http://www.perlarchive.com/
CPAN - #1 Perl Resource  (my id:  PINYAN)        http://search.cpan.org/


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About