in reply to Re: Multiple If Selections
in thread Multiple If Selections

I must disagree. With only three conditions, all of which have very small associated blocks, there's no reason not to use a simple if/else structure. A dispatch table is fine when there are, say, five or more conditions, IMHO. But any less, and you're adding an extra layer of complexity for no reason.

Replies are listed 'Best First'.
Re^3: Multiple If Selections
by McDarren (Abbot) on Jan 07, 2008 at 06:07 UTC
    Well, yes.

    However, in my (somewhat limited) experience I've found that these things tend to grow over time, and before you know it you have to add another test condition, and then another, ....

    So whilst I agree with what you say, the point of my response was to make the OP aware of dispatch tables as an option for when things start to get a little unwieldy.

    Darren :)