From: David Thompson on
On Tue, 23 Mar 2010 12:33:46 -0700 (PDT), Adam Beneschan
<adam(a)irvine.com> wrote:
<snip>
> I wish I could! I've been in this business for over 30 years and I
> still haven't figured out how not to make mistakes. <snip>
> So bounds checking is a good thing. Even so, it's good to have a
> choice. Pascal and Ada, as usually implemented, let you choose
> between the extra safety of bounds checks and the added performance of
> eliminating them in programs that have been tested. C doesn't.

Ada has standard-in-language option, so all implementations must
provide it; PL/I same. Pascal doesn't require checking, but common
practice is yes or option. Fortran doesn't require it, and common
practice is no, but there have long been some that do, especially
since F90 made unnecessary (but did not entirely remove) the
assumed-size' (aterisk) form that most discourages it.

C doesn't prohibit it, but encourages pointer use that makes it more
difficult; there have been bounds-checking C implementations, but in
the dancing bear category.

From: Martin Krischik on
Am 31.03.2010, 08:55 Uhr, schrieb David Thompson
<dave.thompson2(a)verizon.net>:

> Ada has standard-in-language option, so all implementations must
> provide it; PL/I same. Pascal doesn't require checking, but common
> practice is yes or option.

Just noticed that the three languages quoted also lets you specify the
base index. That is you can specify an array starting at 1980 and ending
at 2010. And before the performance freaks panic: If you have a statistic
application collecting data from 1980 to 2010 then a 0 based index will
only give you a lot of extra work but no performance advantage.

Martin
--
Martin Krischik