On 9 Nov 2000 12:10:08 -0500, Conor O'Neill wrote>Question: would anyone consider it acceptable that a 'non-optimising'>mode of a compiler used an 'if-else' sequence to implement all switch>statements?

I'm reading the Dragon book at the moment and recently came across
switch statements in intermediate code generation. There are given two
alternatives, one is a series of if statements, the other involves
building a hash table. Now is this really commonly done or is it often
simply the if approach because it's simpler?

--
Timon Christl <christl@fmi.uni-passau.de>
[That's pretty typical, with a third alternative of a jump table if the
cases are all in sequence or close to it. -John]