R
Roedy Green
Let's say you have some code like this:
case 1:
if ( x )
if ( y )
return a;
else return b;
else return c;
break;
Jva will insist you take out the break because it is not needed.
then later you inadvertently meddle with the code say like this:
case 1:
if ( x )
if ( y )
return a;
else return c;
now you need the break back in there again, but of course Java wont't
tell you.
What is the best way to handle this to make sure you have covered all
possibilites and that you truly can't ever fall through?
You can't even put debug code in there to catch the problem. Java
will make you take it out if the prgram is CURRENTLY working.
--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm
Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
case 1:
if ( x )
if ( y )
return a;
else return b;
else return c;
break;
Jva will insist you take out the break because it is not needed.
then later you inadvertently meddle with the code say like this:
case 1:
if ( x )
if ( y )
return a;
else return c;
now you need the break back in there again, but of course Java wont't
tell you.
What is the best way to handle this to make sure you have covered all
possibilites and that you truly can't ever fall through?
You can't even put debug code in there to catch the problem. Java
will make you take it out if the prgram is CURRENTLY working.
--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm
Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes