in reply to Re^2: Avoiding if/else knotsin thread Avoiding if/else knots
Please see Re: Using Number Ranges in a Dispatch Table for a subtle flaw that causes both the above code and ikegami's variant to fail when the dispatch table is passed 1000.
Please do NOT upvote this node, save your votes for afoken's excellent answer instead. I'm just cross-referencing for those who stumble across this in the future. :-)
Once (shame on you!)
Twice (shame on me!)
More often than I'd like to be
All the time
Just when answering stupid polls
Who you callin' a fool?
I refuse to vote in this ridiculous poll
Results (449 votes). Check out past polls.