Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uflorida!haven!ncifcrf!nlm-mcs!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Must the "switch" quantity be an integer? Message-ID: <8709@smoke.BRL.MIL> Date: 20 Oct 88 10:03:54 GMT References: <6137@june.cs.washington.edu> <8706@smoke.BRL.MIL> <9711@haddock.ima.isc.com> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 11 In article <9711@haddock.ima.isc.com> karl@haddock.ima.isc.com (Karl Heuer) writes: -In article <8706@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes: ->If you really have to have os_t*-shaped magic numbers, consider ... -> #define BUFPTR (&dummy_buf) -> case (ptrint_t)BUFPTR: -C'mon Doug, you know better than that. That isn't a valid integral constant -expression. But it's an allowed extension (approved at September X3J11 meeting) and is the best he'll be able to do along these lines. There is no fully portable way to use a switch expression for this.