Posts: 64
Threads: 11
Joined: Sep 2003
wow, its like, every time i start my program i get a new error.
Like, today i wake up in the morning and start the program and a "Out Of Stack Space" error came up.
I used the clear statement for double checking but it still came up.
:evil: :evil: DAMN BUGS!!!! :evil: :evil:
Posts: 1,407
Threads: 117
Joined: Dec 2002
Ensure all GOSUBS have their RETURNS and you are not exiting a GOSUB with a GOTO
Antoni
Posts: 566
Threads: 86
Joined: Feb 2003
try to get the best from the modules tutos you'll grab here and there...
You probably have big subs that have a lot of local variables. Try to re-think you prog in an object-oriented mood, and don't hesitate to use TYPE if it helps.
Remember a pack of variables (arrays, types, etc...) cannot be more than 64kb, based on the following rules:
1 integer = 2 bytes = 1 number ranging from 0 to 64535
1 string, len=1 = 1 byte = 1 number ranging from 0 to 255
1 real = 4 bytes
etc...
You can "pack" integers on one byte provided they range from 0 to 255, and therefore combine 2 parameters ranging from 0 to 255 into one integer (2 bytes).
You can convert a real number such as .7657 into an integer by multiplying it by 64536...
The rational is endless....
But always remember it's a matter of 0 & 1's...
hink Global, Make Symp' All ! ®
Posts: 4,307
Threads: 63
Joined: May 2003
Humph! How many times will I post this?
http://qbasicnews.com/articles/articles.cgi?page=limits
Please read it carefully. Imp to note is usage of COMMON SHARED.
May be I will add this to my signature? Will it help?