comp.lang.ada
 help / color / mirror / Atom feed
From: Vinzent Hoefler <ada.rocks@jlfencey.com>
Subject: Re: FW: Ada 200X
Date: Tue, 03 Jun 2003 17:16:09 +0200
Date: 2003-06-03T17:16:09+02:00	[thread overview]
Message-ID: <bbie66$9i52o$2@ID-175126.news.dfncis.de> (raw)
In-Reply-To: mailman.1.1054650999.19078.comp.lang.ada@ada.eu.org

Erlo Haugen wrote:

>Wouldn't
>subtype day_number is natural range 1..31;
>type month_days is array (day_number) of some_other_type;
>eliminate the boundschecking??

Inside a function that takes a type day_number as parameter to use it
on an array of type month_days, it definitely should.

The bounds checking should occur *before* calling the function with an
out of range parameter then. Quite hard to determine in C when you
only have ints that can mean everything.


Vinzent.



      parent reply	other threads:[~2003-06-03 15:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-03 12:13 FW: Ada 200X Erlo Haugen
2003-06-03 14:49 ` Preben Randhol
2003-06-03 14:55   ` John R. Strohm
2003-06-03 15:16 ` Vinzent Hoefler [this message]
replies disabled

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