What's the difference between using two if statements
and using 1 if and 1 elseif ???
www.akilla.tk
What's the difference between using two if statements
and using 1 if and 1 elseif ???
www.akilla.tk
Using two if statements causes both of them to be evaluated, an if..else if statement will result in only one being evaluated. I've seen quite a few problems fixed simply by changing a series of if statements to an if..else if construct. I'm assuming you mean something like this by the way:
Compared to:Code:if ( so and so ) // Do something if ( so and so ) // Do something else
-PreludeCode:if ( so and so ) // Do something else if ( so and so ) // Do something else
My best code is written with the delete key.
basically, "else if" is skipped when the first condition is true. pretty simple.
cool.. so that means it's going to be faster...
COOL PROGRAMS @ www.akilla.tk
itsnt about how speed ll it be
its totally different in programming flow
try the tutorials in this site..........it ll help u to understand the difference
Programming is a high logical enjoyable art for both programer and user !!