X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Paul Wilkins User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: strange error References: <20040726055220 DOT 22465 DOT 00000447 AT mb-m11 DOT aol DOT com> In-Reply-To: <20040726055220.22465.00000447@mb-m11.aol.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Lines: 36 Message-ID: Date: Mon, 26 Jul 2004 22:38:15 +1200 NNTP-Posting-Host: 218.101.50.29 X-Complaints-To: abuse AT tsnz DOT net X-Trace: news02.tsnz.net 1090838306 218.101.50.29 (Mon, 26 Jul 2004 22:38:26 NZST) NNTP-Posting-Date: Mon, 26 Jul 2004 22:38:26 NZST Organization: TelstraClear To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Sterten wrote: >>If I'm to understand your thinking, you have in memory the Sym[][] array >>and just after that the R[] array, and you > > > I don't (yet) know where and how they are stored exactly > > want to use R[r] to count >>from the R[] array down to a location in the Sym[][] array? > > no ! This happened accidently due to a bug. Let's head back to the line where the trouble occurs, which I presume you want to fix. m55:r--;if(R[r]!=1)goto m55; r gets decreased until R[r] = 1. That needs to be fixed so that r doesn't go below 0, so we'll use a structure construct to help us understand more easily what's going on. Is that right? In that case, let's count down to 0 and break out when we're successful. for (r; r>=0; r--) if (R[r]==0) break; or for (r; r>=0; r--) if (R[r]==1) break; // out of for loop -- Paul Wilkins