comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison <dennison@escmail.orl.mmc.com>
Subject: Re: Zoo question
Date: 1996/08/19
Date: 1996-08-19T00:00:00+00:00	[thread overview]
Message-ID: <32189B55.2F1CF0FB@escmail.orl.mmc.com> (raw)
In-Reply-To: dewar.840110364@schonberg


Robert Dewar wrote:
> 
> Ken has been a little coy with this example, but his original post and a
> followup strongly suggest that there is some mysterious justification for
> the above code failing to work in the obvious manner.

Yeah, I think its about time for Ken to tell us what he's seeing.

> The 'Valid attribute has nothing at all to do with the case, it is for use
> in cases where by various means you manage to get an abnormal or undefined
> value into a variable (e.g. it is uninitialized, set by a bad unchecked
> conversion, read from a stream, etc.)

I've been burned so many times in the above cases, that I have developed 
a rather cynical attitude towards constraint checking. Its nice to see that
there are some cases where you CAN count on it (assuming it hasn't been 
supressed, or compiled with Ken's compiler).

> Possibility 3 is definitely NOT correct. The reason I am reemphasizing
>  this is that to me the suggestion that this might not work and cannot
>  be relied on may be very unsettling to those who do not know Ada well
>  enough to be confident that statements like this are false. Of COURSE
>  the CE is caught by the handler, you can move CE's around a bit, but
>  not outside the frame. Since we are talking Ada 83 here (though Ada 95
>  is no different), let's quote from the Ada 83 RM, 11.6(4) says
> 
>   second, for each operation, the innermost enclosing frame or accept
>   statement mnust be the same in the alternative order as in the canonical
>   order, and the same exception handlers must apply.

Ahh. That's the piece I was missing. I knew it could be moved. I had just
never heard the limitations before. Out of curiosity, what counts as a 
"frame"? Is it just subprograms and "begin" blocks?

> 
> As to possibility 2, yes, certainly if you suppress constraint errors
> this code will not work.
> 
> In GNAT, we have introduced a pragma Unsuppress, which undoes the effect
> of any Suppress (either from the command line switch or from a pragma

Interesting...

Do you have a "resuppress" compiler option? :-)  


-- 
T.E.D.          
                |  Work - mailto:dennison@escmail.orl.mmc.com  |
                |  Home - mailto:dennison@iag.net              |
                |  URL  - http://www.iag.net/~dennison         |




  parent reply	other threads:[~1996-08-19  0:00 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-08-12  0:00 Zoo question Ken Garlington
1996-08-12  0:00 ` Chris Morgan
1996-08-13  0:00   ` Ken Garlington
1996-08-13  0:00 ` Ted Dennison
1996-08-14  0:00   ` Ken Garlington
1996-08-14  0:00     ` Ted Dennison
1996-08-15  0:00       ` Ken Garlington
1996-08-18  0:00         ` Robert Dewar
1996-08-19  0:00           ` Ted Dennison
1996-08-19  0:00             ` Mark A Biggar
1996-08-20  0:00             ` Robert Dewar
1996-08-15  0:00       ` Robert A Duff
1996-08-15  0:00     ` Robert Dewar
1996-08-15  0:00       ` Bob Gilbert
1996-08-19  0:00         ` Ted Dennison
1996-08-16  0:00       ` Ken Garlington
1996-08-19  0:00       ` Ted Dennison [this message]
1996-08-15  0:00   ` Keith Thompson
1996-08-14  0:00 ` Paul Hussein
1996-08-14  0:00 ` Bob Gilbert
1996-08-14  0:00   ` Ted Dennison
1996-08-14  0:00     ` Bob Gilbert
1996-08-14  0:00       ` Ted Dennison
1996-08-14  0:00         ` Bob Gilbert
1996-08-14  0:00           ` Ken Garlington
1996-08-15  0:00             ` Robert A Duff
1996-08-16  0:00             ` Bob Gilbert
1996-08-19  0:00               ` Ted Dennison
1996-08-25  0:00                 ` Robert Dewar
1996-08-15  0:00           ` Robert I. Eachus
1996-08-15  0:00 ` John Herro
1996-08-16  0:00   ` Robert Dewar
1996-08-18  0:00     ` John Herro
1996-08-19  0:00       ` 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