Quote:
Originally Posted by vip-colgate
Are you sure?
Code:
if( one ) { ...; return; }
if( two ) { ...; return; }
...
|
if your returning a value after the first IF then the others wont be checked.
but if your if check has more then 2 else if you should use a switch its better.
if( bla ){
...
}
else {
......
}
is ok for checking one or two things.
__________________