Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!zodiac!joyce!sri-unix!garth!smryan From: smryan@garth.UUCP (Steven Ryan) Newsgroups: comp.std.c Subject: Re: switch (expression) Message-ID: <978@garth.UUCP> Date: 15 Jul 88 20:30:44 GMT References: <1988Jul12.105547.13268@light.uucp> <7329@cup.portal.com> <12484@mimsy.UUCP> <12492@mimsy.UUCP> Reply-To: smryan@garth.UUCP (Steven Ryan) Organization: INTERGRAPH (APD) -- Palo Alto, CA Lines: 13 >I have no idea why I wrote that. That should be: > > reg = i-1 > if ((unsigned)reg > 36) goto default We're professionals--let some programming aide drudge sweat the details. Actually, there's a cute way to fold default cases to a specific index. I don't remember and I don't feel like working it out, but it's another example of substituting a simple, pipe smashing jump with complicated inline sequence. another fine specification from s m ryan