X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Message-ID: <410D780E.F270C87C@yahoo.com> From: CBFalconer Organization: Ched Research X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: assembly code of the "strange error" - program References: <20040727070949 DOT 29244 DOT 00000306 AT mb-m19 DOT aol DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 37 Date: Mon, 02 Aug 2004 06:02:39 GMT NNTP-Posting-Host: 12.76.143.54 X-Complaints-To: abuse AT worldnet DOT att DOT net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1091426559 12.76.143.54 (Mon, 02 Aug 2004 06:02:39 GMT) NNTP-Posting-Date: Mon, 02 Aug 2004 06:02:39 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com 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?