comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: Exiting from a function or procedure
Date: 2000/04/22
Date: 2000-04-22T00:00:00+00:00	[thread overview]
Message-ID: <8dr78g$t76$1@nnrp1.deja.com> (raw)
In-Reply-To: rm0M4.39$t25.17152@news.pacbell.net

In article <rm0M4.39$t25.17152@news.pacbell.net>,
  tmoran@bix.com wrote:
>   Note also that some compilers are only half-smart and will
> give a warning on the construct
>      if ... then ... return some_value;
>      else ... raise some_exception;
>      end if;
>    end some_function;
> because the compiler realizes that if the program takes the
> "else branch it will drop out the bottom of the function
> without returning any value, but the compiler doesn't realize
> that some_exception will be raised and prevent reaching the
> bottom of the function.

Hard to believe that a compiler would have a bug in it that
was this transparent ... however, the original program should
certainly generate a warning for the exception handler itself
since that will indeed raise Program_Error if executed as a
result of terminating the function without returning a value.


Sent via Deja.com http://www.deja.com/
Before you buy.




  parent reply	other threads:[~2000-04-22  0:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-21  0:00 Exiting from a function or procedure Andres Tarallo
2000-04-21  0:00 ` tmoran
2000-04-21  0:00   ` Andres Tarallo
2000-04-22  0:00     ` Robert Dewar
2000-04-22  0:00       ` Ken Garlington
2000-04-22  0:00       ` tmoran
2000-04-22  0:00         ` Ray Blaak
2000-04-22  0:00           ` David Starner
2000-04-23  0:00         ` Robert Dewar
2000-04-23  0:00           ` tmoran
2000-04-24  0:00             ` Robert Dewar
2000-04-24  0:00               ` tmoran
2000-04-24  0:00                 ` Robert Dewar
2000-04-24  0:00             ` Robert Dewar
2000-04-22  0:00       ` Pablo Moisset
2000-04-23  0:00         ` Robert Dewar
2000-04-24  0:00       ` Scott Ingram
2000-04-22  0:00   ` Robert Dewar [this message]
2000-04-21  0:00 ` Robert A Duff
replies disabled

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