From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e5221eea63340249 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-19 09:03:45 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!wn14feed!wn12feed!wn11feed!worldnet.att.net!207.217.77.102!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3DDA6EE2.2010409@acm.org> From: Jeffrey Carter User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.0) Gecko/20020530 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: how to check if a string variable contains a number or string? References: <3DD99222.5010904@acm.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 19 Nov 2002 17:02:45 GMT NNTP-Posting-Host: 63.184.9.244 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 1037725365 63.184.9.244 (Tue, 19 Nov 2002 09:02:45 PST) NNTP-Posting-Date: Tue, 19 Nov 2002 09:02:45 PST Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:31112 Date: 2002-11-19T17:02:45+00:00 List-Id: sk wrote: > 3) A random file > The quick brown Fox bought 3 carrots for $0.34 > > I would consider using exceptions to realize > that the number and price of carrots are numeric > amounts rather than just strings to be a bad > technique ! Given the choice between using existing subprograms that may raise exceptions and writing new code to do the same thing but without raising an exception, I know of no circumstances in which the latter is an acceptable use of resources. I limit myself to professional software development; on a personal project you may waste your time reimplementing the entire run-time library for all I care. -- Jeff Carter "It's all right, Taggart. Just a man and a horse being hung out there." Blazing Saddles