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,FREEMAIL_FROM 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-22 19:09:43 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!news.gtei.net!enews.sgi.com!news.xtra.co.nz!53ab2750!not-for-mail From: "AG" Newsgroups: comp.lang.ada References: <3DD99222.5010904@acm.org> <3DDA6EE2.2010409@acm.org> Subject: Re: how to check if a string variable contains a number or string? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: Date: Sat, 23 Nov 2002 16:10:43 -0800 NNTP-Posting-Host: 210.54.95.120 X-Complaints-To: newsadmin@xtra.co.nz X-Trace: news.xtra.co.nz 1038020982 210.54.95.120 (Sat, 23 Nov 2002 16:09:42 NZDT) NNTP-Posting-Date: Sat, 23 Nov 2002 16:09:42 NZDT Organization: Xtra Xref: archiver1.google.com comp.lang.ada:31172 Date: 2002-11-23T16:10:43-08:00 List-Id: "Jeffrey Carter" wrote in message news:3DDA6EE2.2010409@acm.org... > 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. Tst, tsk... If you use an existing subprogram that may raise an exception - don't you have to write some new code to handle that exception? And don't you have to provide some sort of recovery perhaps to simulate the non-exception version?