comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: LLQ: -1 a valid boolean?
Date: 2000/05/24
Date: 2000-05-24T00:00:00+00:00	[thread overview]
Message-ID: <8gha10$pud$1@nnrp1.deja.com> (raw)
In-Reply-To: 8ggq7i$dad$1@nnrp1.deja.com

In article <8ggq7i$dad$1@nnrp1.deja.com>,
  Ted Dennison <dennison@telepath.com> wrote:
> I figured that since Boolean'Size=1, then the check ought to
> work

I really can't imagine what you are thinking here. Boolean'Size
being 1 affects precisely two things, the behavior of unchecked
conversion, and the effect of component packing, nothing else
at all. If it does something else, then you have a
misunderstanding of some kind.

> even
> if assiging the value causes Constraint_Error.

Assigning the value is of course erroneous, so it might cause
CE indeed.

> in this instance I was right.

Not at all odd, because it simply means that the check
checked for zero/non-zero which is certainly legal (and
somewhat expected since it is more efficient than explicitly
checking for equality with 1).

> But if the comparison
> itself is erronious, then this is not the way to do it.

Indeed, since this behavior is not guaranteed.

Does the compiler you are using support Fortran.Logical? It
should if it claims to support Annex G, since Annex G expects
interface to Fortran to be implemented if fortran is available.


Sent via Deja.com http://www.deja.com/
Before you buy.




  reply	other threads:[~2000-05-24  0:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-19  0:00 LLQ: -1 a valid boolean? Ted Dennison
2000-05-19  0:00 ` Jeff Carter
2000-05-20  0:00   ` Ted Dennison
2000-05-21  0:00 ` Robert Dewar
2000-05-23  0:00   ` Ted Dennison
2000-05-23  0:00     ` David C. Hoos, Sr.
2000-05-24  0:00       ` Robert Dewar
2000-05-24  0:00         ` David C. Hoos, Sr.
2000-05-24  0:00           ` Robert Dewar
2000-05-24  0:00           ` Ted Dennison
2000-05-24  0:00             ` Robert Dewar [this message]
2000-05-23  0:00     ` Robert Dewar
2000-05-23  0:00       ` Ted Dennison
2000-05-23  0:00         ` Robert Dewar
2000-05-23  0:00           ` Ted Dennison
2000-05-24  0:00             ` Robert Dewar
replies disabled

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