Article View: borland.public.delphi.language.objectpascal
Article #32439Re: How to check if a string value contains a numeric character
From: Dr John Stockton
Date: Fri, 22 Nov 2002 20:19
Date: Fri, 22 Nov 2002 20:19
31 lines
2440 bytes
2440 bytes
JRS: In article <3dddff49@newsgroups.borland.com>, seen in news:borland .public.delphi.language.objectpascal, Martin James <mjames_falcon@dial.pipex.com> posted at Fri, 22 Nov 2002 09:53:32 :- > >Or, even more impressive, use a set: > >if not myString[index] in ['0'..'9'] then.... > >If my solution gets higher marks that others that use a const string, >please send me the fee instead. Jens can go hungry. D3 DCC32 will not compile that without the addition of () as shown below. var mystring : string ; index : integer ; begin if not (myString[index] in ['0'..'9']) then ; end. Any survivors of the D3 DCC32 development team may care to consider whether compiling that should give this : $$5566.pas(4) Fatal: Internal error: C1376 But following the begin with myString := 'fffff' ; index := 3 ; gives a good compile. -- � John Stockton, Surrey, UK. jrs@merlyn.demon.co.uk D3 Turnpike v4 MIME. � <URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/&c., FAQqy topics & links; <URL:http://www.bancoems.com/CompLangPascalDelphiMisc-MiniFAQ.htm> clpdmFAQ; <URL:http://www.borland.com/newsgroups/guide.html> news:borland.* Guidelines
Technical Details
Message-ID:
<vg53EoBTFp39EwCM@merlyn.demon.co.uk>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!ngpeer.news.aol.com!feed2.newsreader.com!newsreader.com!newsfeed.media.kyoto-u.ac.jp!newsfeed.icl.net!newsfeed.fjserv.net!news-FFM2.ecrc.net!fu-berlin.de!news.uni-x.net!newsgroups.borland.com!merlyn.demon.co.uk!spamReferences:
<3ddddf95$1@newsgroups.borland.com> <3dddf0e7@newsgroups.borland.com> <3dddff49@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 109d30,309aca370994f001 X-Google-Attributes: gid109d30,public X-Google-ArrivalTime: 2002-11-22 17:16:07 PST Message-ID: <vg53EoBTFp39EwCM@merlyn.demon.co.uk> Date: Fri, 22 Nov 2002 20:19:31 +0000 From: Dr John Stockton <spam@merlyn.demon.co.uk> Reply-To: Dr John Stockton <reply@merlyn.demon.co.uk> Newsgroups: borland.public.delphi.language.objectpascal Subject: Re: How to check if a string value contains a numeric character References: <3ddddf95$1@newsgroups.borland.com> <3dddf0e7@newsgroups.borland.com> <3dddff49@newsgroups.borland.com> Lines: 31 Organization: Home, 'Surrey', UK MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain;charset=iso-8859-1 X-Newsreader: Turnpike (32) Version 4.00 <FaPHOaas0ellLCXbR0oIxSiVaE> NNTP-Posting-Host: 158.152.233.145 X-Trace: newsgroups.borland.com 1038011718 158.152.233.145 (22 Nov 2002 16:35:18 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!ngpeer.news.aol.com!feed2.newsreader.com!newsreader.com!newsfeed.media.kyoto-u.ac.jp!newsfeed.icl.net!newsfeed.fjserv.net!news-FFM2.ecrc.net!fu-berlin.de!news.uni-x.net!newsgroups.borland.com!merlyn.demon.co.uk!spam