Same wiht If'swith a switch there are a set of valid values, and that's all, and you can make a default action.
But if it's faster then go for it.
Same wiht If'swith a switch there are a set of valid values, and that's all, and you can make a default action.
But if it's faster then go for it.
Last edited by tesco; 09-04-2005 at 11:56 PM.
Using a switch statement instead of nested if-else statements is just better programming. It results in better looking code and should be more efficient, but not to the degree that it would actually be noticable for such a small program.
Bookmarks