Out of Stack Space

Please use this Board for QBasic related requests ( file research, programming, etc.)

Moderators:Administrator, Global Moderator

Post Reply
Guest
Out of Stack Space

Post by Guest » Fri Jul 04, 2003 12:17 am

Any insights would help on this one. Am only 50 lines or so into a 1000 line code and I get the message "Out of stack space." Is there any way to overcome this error (without of course using the Clear command) so that I can trace or step through the program.

Thanks in advance.

John_Schofield
Full Member
Posts:36
Joined:Tue Mar 18, 2003 3:04 am
Location:Lancashire, UK
Contact:

Re: Out of Stack Space

Post by John_Schofield » Fri Jul 04, 2003 3:44 am

sounds like you've got into an endless loop which is using up all of your variable and/or stack space right at the start of the program.

I'd double check your code manually at this point (I find that printing it off helps, rather than staring at the screen!) to ensure that you've not got yourself trapped in a for..next loop or something. Might not be that but it's an obvious candidate (that and trying to make an array too big or something).

If you give us an idea of what has been happening prior to the error then maybe we can have a second guess for you.

Actuary
Newbie
Posts:1
Joined:Fri Jul 04, 2003 12:17 am

Re: Out of Stack Space

Post by Actuary » Mon Jul 07, 2003 7:01 pm

Thanks--that's usually the cause but not in this case. This executable has been running fine with the same data for eons. It was written by a spaghetti coder--he jumps out of his for...next constructs and even gosubs with gotos a lot. The number of calls is what I think is eating up the memory.

I'm wondering if upgrading to QB7.1 would do the trick. Any one know where I can pick that up?

John_Schofield
Full Member
Posts:36
Joined:Tue Mar 18, 2003 3:04 am
Location:Lancashire, UK
Contact:

Re: Out of Stack Space

Post by John_Schofield » Thu Jul 10, 2003 3:52 am

on this site! look in Compilers on the left <------

Post Reply