Xref: utzoo comp.std.c++:271 comp.std.c:3526 Newsgroups: comp.std.c++,comp.std.c Path: utzoo!henry From: henry@zoo.toronto.edu (Henry Spencer) Subject: Re: Proposed Enhancement to select/case (yes, I know...) Message-ID: <1990Sep1.224336.22846@zoo.toronto.edu> Organization: U of Toronto Zoology References: <1990Aug30.164610.3519@zoo.toronto.edu> <1990Aug31.134248@ee.ubc.ca> Date: Sat, 1 Sep 90 22:43:36 GMT In article <1990Aug31.134248@ee.ubc.ca> mikeb@salmon.ee.ubc.ca writes: > case 'A'..'Z': printf ("upper case\n"); break; Heh heh. What does this do on an EBCDIC machine? Not what you think! POSIX 1003.2, which unlike the GNoids has seriously *thought* about the problem, eventually decided that use of such ranges was inherently unportable. It also has a problem in that it is Anglocentric: the intent is presumably to pick up all uppercase alphabetics, but that is *not* necessarily A through Z. 1003.2 has made some minor extensions to regular-expression syntax, for example, so you can really say "match any uppercase alphabetic", rather than saying "match A through Z" and hoping that's right. -- TCP/IP: handling tomorrow's loads today| Henry Spencer at U of Toronto Zoology OSI: handling yesterday's loads someday| henry@zoo.toronto.edu utzoo!henry