On Mon, 12 Jan 2009 02:39:20 -0800 (PST), Patel
<> wrote, quoted or indirectly quoted someone
who said :
>even if u put some statements at case 0: those will be executed and
>will continue the case 1: statements because u dont have "break"
>statement at case 0:, thats the use of "break" here...

see http://mindprod.com/jgloss/switch.html
--
Roedy Green Canadian Mind Productshttp://mindprod.com
PM Steven Harper is fixated on the costs of implementing Kyoto, estimated as high as 1% of GDP.
However, he refuses to consider the costs of not implementing Kyoto which the
famous economist Nicholas Stern estimated at 5 to 20% of GDP

While what you said is correct, the use of ridiculously wide indentation,
excessive blank lines and leetspeak dilutes your effectiveness. I suggest
that you limit indentation to two (OK, maybe as much as four) spaces per
level, limit line width to 80 characters (some suggest 72 or even narrower),
and not be so lazy with your spelling.

It's also good practice to put a 'break' statement at the end of the last
'switch' case (the 'default' in your example).

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!