comp.lang.ada
 help / color / mirror / Atom feed
From: "AG" <ang@xtra.co.nz>
Subject: Re: how to check if a string variable contains a number or string?
Date: Sat, 23 Nov 2002 16:10:43 -0800
Date: 2002-11-23T16:10:43-08:00	[thread overview]
Message-ID: <WjCD9.11198$8o1.1652004@news.xtra.co.nz> (raw)
In-Reply-To: 3DDA6EE2.2010409@acm.org

"Jeffrey Carter" <jrcarter@acm.org> 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?





  reply	other threads:[~2002-11-24  0:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-18 20:41 how to check if a string variable contains a number or string? Sarah Thomas
2002-11-18 21:09 ` Stephen Leake
2002-11-18 21:50   ` David C. Hoos
2002-11-19  0:44 ` sk
2002-11-19  1:21   ` Jeffrey Carter
2002-11-19  4:41     ` sk
2002-11-19 17:02       ` Jeffrey Carter
2002-11-24  0:10         ` AG [this message]
2002-11-23 20:05           ` Jeffrey Carter
2002-11-19  1:26 ` Jeffrey Carter
2002-11-19  3:19 ` SteveD
2002-11-19  9:38 ` Preben Randhol
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox