Article View: borland.public.cppbuilder.nativeapi
Article #12154Re: How to deal with Sets
From: Remy Lebeau (TeamB)
Date: Tue, 23 Dec 2003 21:24
Date: Tue, 23 Dec 2003 21:24
23 lines
1370 bytes
1370 bytes
"Muzzy" <leyandrew@yahoo.com> wrote in message
news:3fe8a95e@newsgroups.borland.com...
> Var c : char;
> ...
> If c in ['A'..'Z'] Then ...
The direct translation would be the following:
char c;
Set<char, 'A', 'Z'> UpperLetters = Set<char, 'A', 'Z'>() << 'A' << 'B'
<< 'C' << and so on ... << 'Z';
...
if( UpperLetters.Contains(c) )
...
A simplier way would be to simply test the value directly:
if( (c >='A') && (c <= 'Z') )
Gambit
Technical Details
Message-ID:
<3fe8b157$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fe8a95e@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,4cc169f4a0bbe667 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-12-23 13:39:49 PST From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3fe8a95e@newsgroups.borland.com> Subject: Re: How to deal with Sets Date: Tue, 23 Dec 2003 13:24:29 -0800 Lines: 25 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 67.22.139.199 Message-ID: <3fe8b157$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1072214359 67.22.139.199 (23 Dec 2003 13:19:19 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail