From: "J-P. Rosen" <rosen@adalog.fr>
Subject: Re: Did I find a bug here?
Date: Sat, 3 Apr 2021 14:37:08 +0200 [thread overview]
Message-ID: <s49nhi$ei5$1@dont-email.me> (raw)
In-Reply-To: <icqmn8F3h91U1@mid.individual.net>
Le 03/04/2021 à 10:18, Niklas Holsti a écrit :
> On 2021-04-03 9:41, J-P. Rosen wrote:
>> Le 03/04/2021 à 07:46, reinert a écrit :
>>> Could AB_Type(X) in "case AB_Type(X) is" function as such a valid check?
>> Yes,
>
>
> I believe not. The use of X as an argument to a type conversion is an
> "evaluation" of X, by RM 4.6(28), which can be a bounded error by RM
> 13.9.1(9) if X'Valid is False.
>
> That bounded error can lead to an exception or simply to continued
> execution with the invalid value.
>
Hmm, yes. I was thinking about eliminating "when others" because the
intended range was covered. If you want to check for invalid values,
'Valid is the only way to go (that's why it was added to the language!)
--
J-P. Rosen
Adalog
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00
http://www.adalog.fr
next prev parent reply other threads:[~2021-04-03 12:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-02 6:30 Did I find a bug here? reinert
2021-04-02 7:30 ` J-P. Rosen
2021-04-02 8:33 ` Niklas Holsti
2021-04-03 5:46 ` reinert
2021-04-03 6:41 ` J-P. Rosen
2021-04-03 8:18 ` Niklas Holsti
2021-04-03 12:37 ` J-P. Rosen [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-04-02 6:15 reinert
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox