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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,72c34c66b38e0e05 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-03 05:20:34 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!fu-berlin.de!uni-berlin.de!dialin-145-254-037-071.arcor-ip.NET!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Proposal: Constructors, Assignment [LONG] Date: Fri, 03 Jan 2003 14:21:03 +0100 Organization: At home Message-ID: References: Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: dialin-145-254-037-071.arcor-ip.net (145.254.37.71) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: fu-berlin.de 1041600032 12211719 145.254.37.71 (16 [77047]) User-Agent: KNode/0.7.1 Xref: archiver1.google.com comp.lang.ada:32487 Date: 2003-01-03T14:21:03+01:00 List-Id: Randy Brukardt wrote: > No, this is illegal. There can only be one result object declared. And > if there is one, returning anything else is illegal. So the declaration > of Result2 and the return of Result3 are illegal. > >>I am not sure, but to determine whether there is only one result, could >>be equivalent to halting problem. So some sort of run-time support will >>be well required to determine this. Or will it be classified as one more >>bound error? > > No, these are all compile-time checks. No run-time penalty at all. And this? function Make_Session (Count: Integer) return Internet_Session is begin for Index in Integer'Range loop declare Result : return Internet_Session (Index); begin if HALT (x) then return Result; end if; end; end loop; end Make_Session; I really dislike this construction. The single possible advantage of this feature I see, is that maybe, it could allow results for entry points, maybe not. -- Regards, Dmitry A. Kazakov www.dmitry-kazakov.de