comp.lang.ada
 help / color / mirror / Atom feed
From: eachus@spectre.mitre.org (Robert I. Eachus)
Subject: Re: Zoo question
Date: 1996/08/15
Date: 1996-08-15T00:00:00+00:00	[thread overview]
Message-ID: <EACHUS.96Aug15102657@spectre.mitre.org> (raw)
In-Reply-To: 4usukc$p47@zeus.orl.mmc.com


In article <321207F7.4D24@lmtas.lmco.com> Ken Garlington <garlingtonke@lmtas.lmco.com> writes:

  > Under what circumstances would it be acceptable to not generate a
  > range check when assigning a value of 6 to an object declared with
  > range 1 .. 5?

   Hardware failure or a program which was already erroneous. (Please,
no religous decussion over what forms of reasoning from erroneousness
are acceptable.  Save that for ARG meetings. ;-)

   Seriously the Zoo program as posted doesn't raise any serious
issues.  The programmer may expect the 'SUCC call to raise
Contraint_Error, but it will be raised immediately afterwords.  Now if
the variable is declared to be of the base type not the subtype, there
is a hard to find bug, but Ada makes it real hard to code that way.
In fact I suspect that that was the intended program, and it got
corrected automatically by the author as it was being typed in.

    I've run into this problem before in ARG discussions, it is often
hard to post code fragments which correctly demonstrate an anomaly
because my fingers automatically clean up the poor code as I type it.


--

					Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...




  parent reply	other threads:[~1996-08-15  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       ` Robert A Duff
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 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
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 [this message]
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