Mail Archives: djgpp/2004/08/02/02:16:06
Sterten wrote:
> Paul Wilkins wrote:
>
... snip ...
>
> if it's such a common error, then why is there apparantly no
> utility yet to convert .c sources into other .c sources which test
> the array bounds ? Can't be so difficult to write such a program.
>
>> To get back to your question, what is going wrong is that R[r] is
>> trying to access negative indicies (the r value). At first C lets
>> you do that even though you're not supposed to, because C give
>> you enough rope with which to hang yourself.
>
> 3rd time in a few days that I hear this ;-)
> C gives me enough rope to hang myself _by accident_ .I'd wish it
> were safer to use C.
Then use an appropriate language. ISO standard Pascal has all
those capabilities, as does Ada. Ada is generally available. The
basic structure of the C language prevents, to all practical
purposes, complete checking of index and pointer ranges. Pascal
and Ada are designed to detect most problems at compile time.
All three (C, Pascal, Ada) have ISO standards that spell out
exactly what the language is and does. Other peculiar languages,
such as C#, Turbo (Borland) Pascal, Basic, have no international
standards. Java is a peculiar mix. Ada and Pascal are both
available under DJGPP and other systems.
--
A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
- Raw text -