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.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,dabd2d2ffbcf1daa X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Exiting from a function or procedure Date: 2000/04/22 Message-ID: <8dr78g$t76$1@nnrp1.deja.com>#1/1 X-Deja-AN: 614042938 References: X-Http-Proxy: 1.0 x28.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Sat Apr 22 03:45:23 2000 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; I) Date: 2000-04-22T00:00:00+00:00 List-Id: In article , 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.