[futurebasic] Local Variable ram usage

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 1999 : Group Archive : Group : All Groups

From: Paul Bruneau <paul_bruneau@...>
Date: Thu, 20 May 1999 08:53:05 -0400
Hi Everyone-

I have a pretty large record data structure that I use which consists of
10,000 bytes. I was writing a function which needs to utilize 3
different variables containing this record type (for swapping/sorting).
Up to this point, I had only used 2 of them in my whole program, which
were globals.

I tried to dim the three variables inside my local fn, but the compiler
complains about memory being exceeded. Now I know that what is happening
is that I am going over the 32k limit, but can someone tell me why
(apparently) a copy (or something) of each of the variables is being put
into the code segment? Aren't local variables stored on the stack? 

To solve the problem, of course, I just made them globals. But for my
general knowledge I would like to know why I had to do this.

Thank you,