From: James Rogers <jimmaureenrogers@worldnet.att.net>
Subject: Re: Ada 0x: Re: Representation clause
Date: Wed, 28 Feb 2001 02:32:59 GMT
Date: 2001-02-28T02:32:59+00:00 [thread overview]
Message-ID: <3A9C63D2.71FEA6F@worldnet.att.net> (raw)
In-Reply-To: WURm6.3437$7e6.1392211@homer.alpha.net
Randy Brukardt wrote:
>
> Because checking 'Valid does NOT evaluate an invalid representation.
> (That is a subtle point.) And creating an invalid representation is
> neither a bounded error nor erroneous: it is only the action of
> EVALUATING an invalid representation that is an error.
>
> Thus, creating a value with Unchecked_Conversion and IMMEDIATELY
> checking it with 'Valid is perfectly valid Ada code. And any compiler
> that raises an exception before doing so is incorrect (and I very much
> doubt you'd find one.)
Yes, that clearly leads to simpler code than my more heavy-handed
approach. I had missed the subtle point that 'Valid does not evaluate
the scalar variable. I was attempting to perform an eqivalent
determination before converting the data to the scalar type.
Thanks for your patience.
Jim Rogers
Colorado Springs, Colorado USA
next prev parent reply other threads:[~2001-02-28 2:32 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-23 2:39 Representation clause Anatoly Chernyshev
2001-02-23 3:59 ` James Rogers
2001-02-23 8:46 ` Ada 0x: " Martin Dowie
2001-02-23 9:01 ` Lutz Donnerhacke
2001-02-23 10:22 ` David C. Hoos, Sr.
2001-02-23 13:56 ` Florian Weimer
2001-02-23 14:57 ` David C. Hoos, Sr.
2001-02-23 21:38 ` Florian Weimer
2001-02-23 21:12 ` Randy Brukardt
2001-02-24 5:44 ` James Rogers
2001-02-24 10:43 ` Florian Weimer
2001-02-24 17:47 ` James Rogers
2001-02-26 19:51 ` Randy Brukardt
2001-02-26 20:20 ` James Rogers
[not found] ` <WURm6.3437$7e6.1392211@homer.alpha.net>
2001-02-28 2:32 ` James Rogers [this message]
2001-02-23 13:25 ` Marc A. Criley
2001-02-23 14:08 ` Des Walker
2001-02-24 13:26 ` David C. Hoos, Sr.
2001-02-24 14:45 ` Ken Garlington
2001-02-25 20:22 ` David C. Hoos, Sr.
2001-02-26 0:53 ` Ken Garlington
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox