🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #440

Re: Proposed Enhancement to select/case (yes, I know...)

#440
From: Henry Spencer
Date: Sat, 01 Sep 1990 22:43
15 lines
1299 bytes
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
Technical Details
Message-ID: <1990Sep1.224336.22846@zoo.toronto.edu>
Path: arc1-ca.pugleaf.net!utzoo!henry
References: <BURLEY.90Aug30030645@world.std.com> <1990Aug30.164610.3519@zoo.toronto.edu> <1990Aug31.134248@ee.ubc.ca>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c++,comp.std.c
Path: arc1-ca.pugleaf.net!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: <BURLEY.90Aug30030645@world.std.com> <1990Aug30.164610.3519@zoo.toronto.edu> <1990Aug31.134248@ee.ubc.ca>
Date: Sat, 1 Sep 90 22:43:36 GMT