Richmond- Monday, September 21, 2009, 12:48:58 PM, you wrote:
> I have to use either: > 1. A multi-case switch statement with many sub-switch statements inside it, > or > 2. A multi-case switch statement with many IF . . . THEN statements > inside it, > or > 3. Many IF . . . THEN statements with many IF . . . THEN statements > inside them. > Number 3. is obviously going to slow things down a ton! Actually there's no speed penalty for if/then vs switch constructs. They compile down to the same comparisons. If you're going to be applying the same tests repeatedly then you may find a negligible difference, but overall I wouldn't worry about this. > Should I choose 1. or 2 ? and why? I usually find that switch statements are more readable after the fact than nested ifs, but others may have other opinions about this. -- -Mark Wieder mwie...@ahsoftware.net _______________________________________________ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution