Re: what does two semicolns ';;' do
- From: AnrDaemon <anrdaemon@xxxxxxxxxxx>
- Date: Mon, 30 Jun 2008 04:18:36 +0400
Greetings, Ivan Sanchez Ortega.
In reply to Your message dated Saturday, June 28, 2008, 23:01:00,
for(;;){ // for([two semicolons){
what is the function of the two semicolons? loop until break?
The two semicolons are *part* of the "for" construct. See any books on C or
C++ about "for" loops.
That means that the initial statement, the break condition and the loop
statement in that loop are the empty statement.
That means that the for loop does not initialize anything when starting,
does not check for any break condition, and does not perform anything at
the end of each loop.
Which means, that's an infinite loop (until it's broken by calling the
break() construct inside the loop)
Ridiculous usage of the language construct...
Why not use
while(true){ ... }
then?
--
Sincerely Yours, AnrDaemon <anrdaemon@xxxxxxxxxxx>
.
- Follow-Ups:
- Re: what does two semicolns ';;' do
- From: Michael Fesser
- Re: what does two semicolns ';;' do
- References:
- what does two semicolns ';;' do
- From: larry
- what does two semicolns ';;' do
- Prev by Date: Re: foreachif suggestion
- Next by Date: Cheap Price !! 25 Years AF1 Shoes, Timberland UGG Boots, Diesel Evisu Shoes
- Previous by thread: Re: what does two semicolns ';;' do
- Next by thread: Re: what does two semicolns ';;' do
- Index(es):
Relevant Pages
|