From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Proposal: Constructors, Assignment [LONG]
Date: Fri, 3 Jan 2003 13:29:51 -0600
Date: 2003-01-03T13:29:51-06:00 [thread overview]
Message-ID: <v1bp5bd7o2sh75@corp.supernews.com> (raw)
In-Reply-To: av42mv$bklg7$2@ID-77047.news.dfncis.de
Dmitry A. Kazakov wrote in message ...
>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;
That would raise Program_Error if Halt was never true, because there was
no return in the function. That of course is the same as the current Ada
rule.
Randy.
next prev parent reply other threads:[~2003-01-03 19:29 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
2003-01-03 19:29 ` Randy Brukardt [this message]
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