From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2c52e9e46bd47415 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-03 08:17:28 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!fu-berlin.de!uni-berlin.de!213.200.246.247!not-for-mail From: Vinzent Hoefler Newsgroups: comp.lang.ada Subject: Re: FW: Ada 200X Date: Tue, 03 Jun 2003 17:16:09 +0200 Organization: JeLlyFish software Message-ID: References: NNTP-Posting-Host: 213.200.246.247 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: fu-berlin.de 1054653447 10032216 213.200.246.247 (16 [175126]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:38500 Date: 2003-06-03T17:16:09+02:00 List-Id: 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.