comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Proposal: Constructors, Assignment [LONG]
Date: Fri, 03 Jan 2003 14:21:03 +0100
Date: 2003-01-03T14:21:03+01:00	[thread overview]
Message-ID: <av42mv$bklg7$2@ID-77047.news.dfncis.de> (raw)
In-Reply-To: v195k5bkq6d535@corp.supernews.com

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



  reply	other threads:[~2003-01-03 13:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-24 11:16 Proposal: Constructors, Assignment [LONG] Dmitry A. Kazakov
2002-12-26 22:11 ` Nick Roberts
2002-12-27 17:43   ` Dmitry A. Kazakov
2002-12-27 20:17     ` Randy Brukardt
2002-12-29 13:43       ` Dmitry A. Kazakov
2002-12-29 18:45         ` Nick Roberts
2002-12-30 12:23           ` Dmitry A. Kazakov
2002-12-30 15:14             ` Robert A Duff
2002-12-31 13:02               ` Dmitry A. Kazakov
2003-01-01  0:28                 ` Randy Brukardt
2003-01-01 14:13                   ` Dmitry A. Kazakov
2003-01-02 19:44                     ` Randy Brukardt
2003-01-03 13:21                       ` Dmitry A. Kazakov [this message]
2003-01-03 19:29                         ` Randy Brukardt
2003-01-03 20:50                       ` Robert A Duff
2003-01-04 12:53                         ` Dmitry A. Kazakov
2003-01-01  0:54         ` Randy Brukardt
2003-01-01 14:13           ` Dmitry A. Kazakov
2003-01-02 19:36             ` Randy Brukardt
2003-01-03 13:20               ` Dmitry A. Kazakov
replies disabled

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