Re: Compiler Error 25


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Robert G Laurin on May 04, 2012 at 07:28:03:

In Reply to: Re: Compiler Error 25 posted by Barbara Brazil on May 04, 2012 at 06:08:16:

I was right, has nothing to do with usefiles.

What I found is that it looks like (I am speculating here) the compiler generates a new temporary accumulator every time it needs one and eventually runs out.

My program is an address verification and correction. It does a huge amount of strings and sub-strings manipulation and comparison.

Here's what I did:

I restored my source as of yesterday morning and ran a file compare (WinDiff) between the current source and my backup.
I then proceeded to apply all the 50 or so changes I made yesterday recompiling every change or two.

When I applied the last change it failed!

Here's the piece of code:


FOR X = 2 TO 30
If POS(SUB(LOOKUP$,X,1),SUB(WORD$,X-1,3)) > 0 ! Found Char as +/- 1
Let Score1 = Score1 + 1
Endif
If POS(SUB(WORD$,X,1),SUB(LOOKUP$,X-1,3)) > 0 ! Found Char as +/- 1
Let Score2 = Score2 + 1
Endif
If POS(SUB(WORK2$,X,1),SUB(LOOKUP$,X-1,3)) > 0 ! Found Char as +/- 1
Let Score3 = Score3 + 1
Endif

If POS(SUB(LOOKUP$,X,1),SUB(WORK2$,X-1,3)) > 0 !** These line cause Compile Error M25 later in the code
Let Score4 = Score4 + 1 !**
Endif !**

If X GE Len(LOOKUP$) AND _
X GE Len(WORD$) AND _
X GE Len(WORK2$)
Let X = 30 ! We're done
Endif
Next X

The errors (M25) started showing 350 lines lower in the code where I am again doing a lot of SUB strings (my usefiles).

Playing with the code and changing the lines to read:


Let Char$ = SUB(LOOKUP$,X,1)
If POS(Char$,SUB(WORK2$,X-1,3)) > 0
Let Score4 = Score4 + 1
Endif

Made the problem disappear (probably until I add another SUB( ) in another function later).

The size of the Symbol Table in the compiler went from 31785 down 10 every time I removed a SUB( ) in similar type of code.

So is it possible the compiler creates a new temporary variable every time it needs one instead of recycling? Is it cycling it's internal name until it runs out? Just happens that my code here used up enough to cause subsequent and innocent usefiles to feel the wrath of the M25s ?


Tested on Comet16 2011.459 and Comet 2008. Works fine with Comet32.


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?  

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]