continue with switch

K

Keith Thompson

Bart Rider said:
Any break inside a switch statement is actually assigned to the
switch statement (it leaves the choice statement switch and continues
with the first statement after switch) and not for any surrounding
loop. The same applies to continue IMHO.

I'm afraid that your opinion, humble or otherwise, has no bearing on
the question.
 
F

Flash Gordon

Keith said:
Which one is that?

JGFI ;-)

It's alt.free.newsservers and Google carries it.

I think the usefulness of the group varies, but there are still people
there who will help anyone that wants a legally free news account.
 
R

Rod Pemberton

Keith Thompson said:
Which one is that?

It's useless but called: alt.free.newservers. Your better off with free
NNTP listings on various websites. GIYF.


Rod Pemberton
 
C

CBFalconer

Default said:
Many ISPs these days have dropped usenet access, notably AOL.
Mostly dial-ups (in the US) have gotten rid of it, but some
broadband providers. If the OP is unable to get it from the ISP,
then either a free news service (I don't personally know of any)
or a for-pay one will be needed. I use news.individual.net, it
costs 10 euro per year, about $13 US.

I don't think many really consider AOL a viable ISP. As far as I
am concerned without news service a <whatever> service provider is
not providing Internet service. Many ISPs farm their news server
portion out to giganews, and I believe individuals can also get
such service at a fair price if they are really stuck with a non-I
SP.

Ask before signing up to any ISP.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
Also see <http://www.safalra.com/special/googlegroupsreply/>
 
H

Herbert Rosenau

'continue' within switch actually associated with the outer 'while'
loop. Is this behavior protable?

int ch = '\n';
while (true) {
switch(ch) {
case '\n': cout << "test"; continue;
}
}

the above loop executed endlessly

That is what you asks for.

You should change while (true) to something that you can change when
you have to leave the while loop.

In switch 'continue' means simply leave the current work on the switch
and iterate to the next while. As the while says to run endless so the
program continues again with the switch.

In switch 'break' says leave off the work inside switch and continue
with the next statement immediately after the switch block it would
end as above because the next statement says that while() ends.
Iterating the while loop agains means execute the switch because true
will never been false, so while runs for ever.

So your program does exactly what you says it should do: run for ever.

--
Tschau/Bye
Herbert

Visit http://www.ecomstation.de the home of german eComStation
eComStation 1.2 Deutsch ist da!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top