|Tool for replacing switch with if-then-else in C? email@example.com (Markus Mock) (1997-08-07)|
|Re: Tool for replacing switch with if-then-else in C? firstname.lastname@example.org (1997-08-09)|
|From:||email@example.com (Gene Wirchenko)|
|Date:||9 Aug 1997 20:12:26 -0400|
|Organization:||All USENET -- http://www.Supernews.com|
|Keywords:||C, translator, comment|
Markus Mock <firstname.lastname@example.org> wrote:
>Does anybody know a system that translates C source code to C source
>replacing all switch constructs by if-then-else constructs?
>[Why would you want such a thing? -John]
Possibly due to Standard limitations. I think that you're only
guaranteed 40 cases per switch. I don't know what the limitation is
for nested ifs (or if there is one).
switch is also rather brain-dead on conditions and perhaps Mr.
Mock wants to then spruce up the code with more complex conditions.
[The limit's actually 257 per switch, but I suppose I could see the
spruce up stuff. -John]
Return to the
Search the comp.compilers archives again.