[futurebasic] Re: [FB] Symbol Table Implementation

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 2012 : Group Archive : Group : All Groups

From: Brian S <fblistserve@...>
Date: Tue, 11 Sep 2012 08:27:40 -0700
On Sep 11, 2012, at 4:41 AM, Carlos Frías <carfrino@...> wrote:

> '-----------
> At line 216 of Symbol Table Implementation
> Index 32768 is outside the DIM range 0 to 32767
> '-----------
Carlos,

The sheer size of your app is overwhelming the fixed-sized symbol table in FBtoC. FBtoC collects all symbols( i.e. variables and names ) and saves them in an array of records. Since the array is a fixed size, it is possible ( as you found out ) to exceed the size of the table. FBtoC’s error message is a self-induced crash saying something like: "I can’t process any further, so I’m quitting". It is NOT a specific syntax error in your code.

I’m assuming there was also another part of this message that says "Symbol table full"?

FBtoC’s internal symbol table is a fixed 32767 size. Even for large projects this is usually big enough. For example, the FB5 editor project leaves 13000 slots free in the table. Early in the FBtoC project a dynamic symbol table was used but later changed to fixed due to bugs( as I recall-- it’s been several years---- they might have been related to bugs in dynamic arrays which were subsequently corrected ). There might be other solutions too such as just making the table larger. Whatever the fix might be, it will require some study and work to implement and make sure it doesn’t break other code. My own time is full with my real job. Possibly one of the other team members will look further.

Brian S.