Close I. aldweb

Close II. PC Freeware

Close III. Palm Freeware

Close IV. Palm Shareware

Close V. iziBasic Palm

Close VI. Palm Knowledge

Close VII. Pocket Computer

Close VIII. miniPortail

Special !

Mobile version of
the aldweb Site

Neither French, nor English?

Try one of these flags then:
[de] [es] [it] [pt]

Weather / Spam / www

Lyon Weather

aldweb against spam

To receive news about this website, consider subscribing to our Newsletter.
298 Subscribers
Family's web sites

Webmaster - Infos
Friends News


   visitors online

What do you think of the new design of the aldweb Site?
Great !
So ugly...
forum.gifForum - iziBasic - Topic #1518

Forum - Forum
iziBasic - iziBasic

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257

active  Topic # 1518  Number Stack

05/03/2007 @ 16:56
by JoeV


Hello again.

My app is getting large, just over 16K out of 24,000 bytes available. Izibasic compiler says that I am only using 556 [+11] bytes of number stack out of 12,000. I recently received a “number stack overflow” compiler error. As per the manual, I changed some variables (only 3) to constants and that fixed the problem. Since I have more code to write, I expect to receive more overflow errors. (Maybe immediately after writing this email.) Perhaps I am writing code that inefficiently uses the numbers stack.

Therefore, my questions at this point are:

(1) 12,000-556>11,000 bytes that iziBasic needs for my app. Is this possible?
(2) How does iziBasic use the numbers stack beyond what my program variables require?
(3) How can I write my code to minimize the numbers stack usage, thereby reducing the chance of an overflow error in the future?
(4) Is there a way that I can monitor the stack's size so that I can be warned before an error occurs?

I know that's a lot to ask. As usual, any help is greatly appreciated.

  Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 1
06/03/2007 @ 00:26
by aldweb


Hello Joev,

1) No, the code stack and the number stack are 2 different things.

2) It should not be used too much, mainly for complex calculations, but no more than 20 or so stack items, so you are far from the limit.
Make sure that you do not get an array index out of range when using the A() array...

3) With a stack of 12000 possible number values to store, you have plenty of space.
So there must be something in your code that exhausts this limit. I just cannot figure out what at this stage...

4) Yes, use the FRE function, with:
FRE(1) first free Number stack address
FRE(4) last free Number stack address
So, the difference between these 2 values should give you how your free stack evolves over time.
So just test it in various area of your source code and we might be able to isolate the area where something strange/wrong/weird occurs. From that point on, it will be easier to help you!

Write to aldweb   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 2
06/03/2007 @ 01:43
by JoeV


Since I am only using 556 out of 12,000 bytes of the numbers stack, it must have been another problem, such as an array. Fre(4) should help me pin this down, should it happen again.

Thanks again, Aldweb.

  Post an answer  Top
active topic active   closed topic closed   Sticky Sticky   New New message   -   Correct Correct message   Close Close topic   Make sticky Make sticky
Forum Topic  Forum 

^ Top ^