comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey D. Cherry" <jdcherry@utech.net>
Subject: Re: Exception Handling
Date: 2000/06/02
Date: 2000-06-02T00:00:00+00:00	[thread overview]
Message-ID: <3937D0B9.C952A204@utech.net> (raw)
In-Reply-To: 3936E41C.FCDE89D6@acm.org

Jeff Carter wrote:
> 
> Ada provides at least 2 ways to check that a string contains an
> appropriate representation of a floating-point number: 'Value and
> Ada.Text_IO.Float_IO. Both convert the string to a floating-point value
> and signal an invalid string by raising an exception. Whether you agree
> that raising an exception is appropriate, why would you write another
> subprogram to parse a string for a floating-point value when you can
> reuse these existing, robust, and well-tested subprograms?

Normally you would always use the available facilities to perform this kind 
of an operation.  There are, however, rare situations where the Ada library 
facilities are not available.  One example would be when developing an 
embedded application.  The compiler vendor does not always supply a run-time 
library for the target processor.  Another example would be a in a 
safety-critical application that requires certification of all the code, 
including the run-time library routines.  In these cases, some compiler 
vendors don't supply the source for their run-time libraries, or it's too 
expensive to get a certified version of the run-time library and so the 
developer generates equivalent versions of the few run-time library routine 
they use in their application.  (I must say that I've never experienced this 
situation with _Ada_ compiler vendors.)

Bear in mind that these two examples have little or no bearing on the original 
example problem which read a string from standard input and converted it to
a float value if there were no format errors on the input string.

-- 
Regards,
Jeffrey D. Cherry
Senior IV&V Analyst
Logicon Space and Information Operations
Logicon Inc.
a Northrop Grumman company




  reply	other threads:[~2000-06-02  0:00 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-29  0:00 Exception Handling NANCY HEHIR
2000-05-29  0:00 ` Preben Randhol
2000-05-30  0:00 ` Antonio Dur�n Dom�nguez
2000-05-30  0:00 ` Jeffrey D. Cherry
2000-05-30  0:00   ` Gautier
2000-06-05  0:00     ` Robert Dewar
2000-06-01  0:00   ` Preben Randhol
2000-06-01  0:00     ` Preben Randhol
2000-06-01  0:00     ` Ehud Lamm
2000-06-01  0:00     ` Jeffrey D. Cherry
2000-06-02  0:00       ` David C. Hoos, Sr.
2000-06-02  0:00         ` Jeffrey D. Cherry
2000-06-01  0:00     ` Jeff Carter
2000-06-02  0:00       ` Jeffrey D. Cherry [this message]
2000-06-02  0:00       ` Preben Randhol
2000-05-30  0:00 ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
1996-09-28  0:00 Robert Dewar
1996-09-17  0:00 John Goodenough
1996-09-17  0:00 Marin David Condic, 407.796.8997, M/S 731-93
1996-09-19  0:00 ` Larry Kilgallen
1996-09-13  0:00 Marin David Condic, 407.796.8997, M/S 731-93
1996-09-15  0:00 ` Larry Kilgallen
1996-09-23  0:00 ` Robin Vowels
1996-09-12  0:00 Robbie Gates
1996-09-12  0:00 ` Bryce
1996-09-12  0:00   ` Larry Kilgallen
1996-09-13  0:00     ` Robbie Gates
1996-09-14  0:00       ` Paul A. Houle
1996-09-18  0:00         ` Rick Decker
1996-09-12  0:00 ` Patrick Doyle
1996-09-12  0:00   ` Rick Decker
1996-09-13  0:00     ` Larry Kilgallen
1996-09-13  0:00 ` Felix Kasza
1996-09-13  0:00   ` David B. Shapcott [C]
1996-09-18  0:00     ` Bart Termorshuizen
1996-09-16  0:00 ` Norman H. Cohen
1996-09-23  0:00   ` Robin Vowels
1996-09-24  0:00     ` Bob Halpern
1996-10-02  0:00       ` Fritz Schneider
1996-10-07  0:00         ` Robin Vowels
1996-10-09  0:00         ` shmuel
1996-10-09  0:00           ` Bob Halpern
1996-09-26  0:00     ` Thiago
1986-05-13 22:57 exception handling MIXSIM
replies disabled

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