Path: utzoo!telly!ddsw1!lll-winken!uunet!labrea!agate!ucbvax!ucsd!orion.cf.uci.edu!uci-ics!siam.ics.uci.edu!schmidt From: schmidt@siam.ics.uci.edu (Doug Schmidt) Newsgroups: gnu.g++.bug Subject: g++ extensions Message-ID: <5045@paris.ics.uci.edu> Date: 22 Jan 89 03:42:28 GMT Sender: news@paris.ics.uci.edu Reply-To: Doug Schmidt Organization: University of California, Irvine - Dept of ICS Lines: 25 FYI, While I was browsing through the GNU G++ source code this weekend I noticed the following useful extension that allows Pascal-like ranges in the switch statement: ---------------------------------------- main (int argc, char *argv[]) { switch (argv[1][0]) { case 'a'..'z' : printf ("lowercase\n"); break; case 'A'..'Z' : printf ("uppercase\n"); break; case '0'..'9' : printf ("digit\n"); break; } } ---------------------------------------- Enjoy! Doug -- schmidt@ics.uci.edu (ARPA) | Per me si va nella citta' dolente. office: (714) 856-4043 | Per me si va nell'eterno dolore. | Per me si va tra la perduta gente. | Lasciate ogni speranza o voi ch'entrate.