[Basic] - Memory overflow
Moderator: MaxCoderz Staff
[Basic] - Memory overflow
Been working on a menu system for the past week or so, and just got a couple versions finally working. When I scan a lot of entries, however, the calc comes up with a memory shortage, even with a couple thousand in ram. I'm only using an if:then statement, and while hearing about problems, have not yet encountered any until now.
Can I get some help or any informative knowledge? Thanks.
Can I get some help or any informative knowledge? Thanks.
-
- Calc King
- Posts: 2195
- Joined: Sun 27 Mar, 2005 4:06 am
- Location: sleeping
- Contact:
Well it has to be what's Ans or that you have too many If statements not closed yet.
So it could be a combination of both, since each if statement is about 40 bytes I believe and if your messing with Matrices or Lists that can eat up more memory. And if you don't have much memory to start with then that could add to it.
You can post the code useing this and we can try to help you better.
Code: Select all
If X=1:Then
something
If A=2:Then
something
If B=3:Then
something
If C=4:Then
...
etc
You can post the code useing this and we can try to help you better.
If you GOTO out of an If block, then it leaves junk on some kind of stack, eventually leading to a memory error. You might be able to use an End after a label to get around it, or just make any IF that uses a goto only a single line long.
You know your hexadecimal output routine is broken when it displays the character 'G'.
- KermMartian
- Calc Wizard
- Posts: 549
- Joined: Tue 05 Jul, 2005 11:28 pm
- Contact:
If you need to post source code, try http://sc.cemetech.net . You can also find tips on this kind of problem here:
http://www.cemetech.net/forum/viewtopic.php?t=906
http://www.cemetech.net/forum/viewtopic.php?t=906
- thegamefreak0134
- Extreme Poster
- Posts: 455
- Joined: Mon 23 Jan, 2006 10:09 pm
- Location: In front of a Computer, coding
- Contact:
You've got enough End statements to go with your If:Then/While/Repeat/For/ect. statements? This is often a cause of such errors. Of course, this usually also causes the program to not work properly... However, if you have say a long list of instructions and then a Goto to take it back to the top this can happen right under your nose. Does the program appear to "slow down" before the error?