Article View: borland.public.jbuilder.java.api
Article #667Re: int or float
From: RaynorPao
Date: Sat, 12 Apr 2003 17:10
Date: Sat, 12 Apr 2003 17:10
26 lines
1795 bytes
1795 bytes
Hi Gillmer: Thanks for your suggestion. RaynorPao. "Gillmer J. Derge [TeamB]" <spam@gillmerderge.com> ���g��l�� news:3e96ce20$1@newsgroups.borland.com... > > Looks OK to me. > > You could also consider using java.text.NumberFormat. The approach would > be similar. Get a NumberFormat instance to parse integers and another to > parse floats. Then try each one and catch exceptions to find the invalid > values. > > The advantage is that it would be a little more robust to international > variations in number formatting. For example, "1,234" means something very > different in the United States versus Germany. In particular, it's a valid > integer in Germany but not in the U.S. > > -- > Gillmer J. Derge [TeamB] > >
Technical Details
Message-ID:
<3e9844cb@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3e959322@newsgroups.borland.com> <u65pl1rxk.fsf@ergo.no> <3e96c819$1@newsgroups.borland.com> <3e96ce20$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 1089d0,e40b384e2aa5f880 X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2003-04-12 09:57:25 PST From: "RaynorPao" <RaynorPao.nospam@nospam.pchome.com.tw> Newsgroups: borland.public.jbuilder.java.api References: <3e959322@newsgroups.borland.com> <u65pl1rxk.fsf@ergo.no> <3e96c819$1@newsgroups.borland.com> <3e96ce20$1@newsgroups.borland.com> Subject: Re: int or float Date: Sun, 13 Apr 2003 01:10:49 +0800 Lines: 28 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 NNTP-Posting-Host: 61.221.176.28 Message-ID: <3e9844cb@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1050166475 61.221.176.28 (12 Apr 2003 09:54:35 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail