Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!smurf!gopnbg!tmpmbx!zelator!heaven7!martini From: martini@heaven7.UUCP (Martin P. Ibert) Newsgroups: comp.lang.c Subject: Re: Comments solicited re: quoted constants Message-ID: <3151020@heaven7.UUCP> Date: 30 Apr 90 19:57:50 GMT Organization: The Seventh Heaven, Berlin, Germany Lines: 6 X-Version: Rodney's UUCP modules 05/04/90 V1.00 In <16527@haddock.ima.isc.com>, karl@haddock.ima.isc.com (Karl Heuer) writes: >$ But I did invent a neat hack that avoids the problem in a fairly clean > manner: switch (s[0]*'\1\0'+s[1]*'\0\1') { case 'xy': ... } should work > with any sane implementation of SCCs, regardless of byte size and sex. No, it shouldn't. Siamese character constants in itself are evil and non- portable. (I'm sure my compiler barfs at them.) My advice: Forget it. -- __*__ | Martin P Ibert, Westendallee 100d, D-1000 Berlin 19, Germany ----| |---- | Domain: martini@heaven7.uucp or martini%heaven7@zelator.uucp ============= | Bang path: ..!uunet!unido!tub!tmpmbx!zelator!heaven7!martini | | | | | | | ------------------------------------------------------------ | | | | | | | --- The lessons of Chernobyl have still not been learned ---