Thread View: comp.lang.pascal.borland
3 messages
3 total messages
Started by Minh Pham
Tue, 24 Aug 1999 00:00
Re: Please Help - Error 202: Stack overflow error.
Author: Minh Pham
Date: Tue, 24 Aug 1999 00:00
Date: Tue, 24 Aug 1999 00:00
12 lines
1901 bytes
1901 bytes
Please help. I have been working on this program for years.
I have a problem with Turbo Pascal 7.0. I keep getting the 202 Stack
Overflow error. I tried changing everything with the memory stack size to
maximun in the Option. I was just wondering whether there is any way
around this problem. I tried setting the stack check off {$S-} but the
progam became erratic.
As an aside, if I convert it to Turbo C++, would this still be a problem?
Thank you.
Re: Please Help - Error 202: Stack overflow error.
Author: enztec
Date: Thu, 02 Sep 1999 00:00
Date: Thu, 02 Sep 1999 00:00
26 lines
2192 bytes
2192 bytes
I'd bet you are defining a variable with the same name as the name of
the variable you are passing in the procedure
is this what you have done?
procedure duck(goose : string);
var goose : string;
Minh Pham wrote:
>
> Please help. I have been working on this program for years.
>
> I have a problem with Turbo Pascal 7.0. I keep getting the 202 Stack
> Overflow error. I tried changing everything with the memory stack size to
> maximun in the Option. I was just wondering whether there is any way
> around this problem. I tried setting the stack check off {$S-} but the
> progam became erratic.
>
> As an aside, if I convert it to Turbo C++, would this still be a problem?
>
> Thank you.
Re: Please Help - Error 202: Stack overflow error.
Author: Mike Copeland
Date: Thu, 02 Sep 1999 00:00
Date: Thu, 02 Sep 1999 00:00
31 lines
2945 bytes
2945 bytes
Not necessarily the cause of a Stack Overflow error, IMO. It's much
more likely to be one of the following:
1. Declaring large local structures (or many) in a subprogram that's
called - nesting with other subprograms using significant amount of local
variables...or not. The issue is that at any given time during the
program's execution, the _total_amount_ of Stack used cannot exceed the
limits stated in the $M directive (which has a maximum of 64K bytes).
2. Extreme nesting of procedures which use together use some local
variables, so that the total exceeds the Stack limit. This typically
involves very convoluted structure/logic, something which might have
evolved over a long time. Could be very hard to track down...
3. One of more recursive procedures which (1) recurse very deeply (due
to data vagaries) and/or (2) which use a significant amount of local
variables (such as strings).
> I'd bet you are defining a variable with the same name as the name of
> the variable you are passing in the procedure
> is this what you have done?
>
> procedure duck(goose : string);
> var goose : string;
> >
> > Please help. I have been working on this program for years.
> >
> > I have a problem with Turbo Pascal 7.0. I keep getting the 202 Stack
> > Overflow error. I tried changing everything with the memory stack size to
> > maximun in the Option. I was just wondering whether there is any way
> > around this problem. I tried setting the stack check off {$S-} but the
> > progam became erratic.
> >
> > As an aside, if I convert it to Turbo C++, would this still be a problem?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads