delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/07/23/03:32:45

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Lines: 20
X-Admin: news AT aol DOT com
From: sterten AT aol DOT com (Sterten)
Newsgroups: comp.os.msdos.djgpp
Date: 23 Jul 2004 07:24:32 GMT
References: <20040723023556 DOT 15872 DOT 00001561 AT mb-m21 DOT aol DOT com>
Organization: AOL Bertelsmann Online GmbH & Co. KG http://www.germany.aol.com
Subject: Re: strange error
Message-ID: <20040723032432.19192.00002048@mb-m06.aol.com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

>>m55:r--;if(R[r]!=1)goto m55;
>
>I think this is the problem.
>r might become smaller 0.

.. and then anything can happen depending on what just happens to stand at that
memory location.

But this is a weakness of C when compared to
e.g. Basic, which issues an error when an index is out of the predefined range
thus
helping to debug the program.

I understand that checking the ranges might
slowdown the program, but IMO there should  be at least  the option for a
compiler switch
to generate a slow .exe which does this.


--Guenter

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019