String Formula Too Complex 
Author Message
 String Formula Too Complex

This might be a faq, but I have a rather large application
written in MS Basic and Assembly which has been crashing
due to the "String Formula Too Complex" error.  It is
compiled under Basic PDS (7) using far strings.  The most
obvious solution would be to find the "complex" string
formula and cut it up.  However, this error happens often
and as far as I can tell, not on the same line, or even on
lines of any particular complexity, i.e., simple
contcatenation.

Is there any way I can avoid this error.  Any and all help
will be appreciated!

Bob Santore



Tue, 24 Nov 1998 03:00:00 GMT  
 String Formula Too Complex


Quote:
>This might be a faq, but I have a rather large application
>written in MS Basic and Assembly which has been crashing
>due to the "String Formula Too Complex" error.  It is
>compiled under Basic PDS (7) using far strings.  The most
>obvious solution would be to find the "complex" string
>formula and cut it up.  However, this error happens often
>and as far as I can tell, not on the same line, or even on
>lines of any particular complexity, i.e., simple
>contcatenation.
>Is there any way I can avoid this error.  Any and all help
>will be appreciated!

To avoid it is kinda hard since it's not really general knowledge, or
even mentioned in any of the documentation what actually constitutes a
string formula that's too complex... <G>

One possible solution that may help find the culprit is  to compile it
and run it until it bombs out. Write down the address where it fails,
then reassemble it with the /A switch.

After the recompile, the /A switch will have created a file that you
can search with a decent text editor for the offset that caused the
problem.

This will get you very close to the actual line that's causing the
problem. I haven't used any of the MS BASICs in a while, but if my
memory serves me right, the above should work...

JE McTaggart

LaJunta, Colorado



Wed, 25 Nov 1998 03:00:00 GMT  
 String Formula Too Complex

Quote:

>>I have a rather large application
>>written in MS Basic and Assembly which has been crashing
>>due to the "String Formula Too Complex" error.  It is
>>compiled under Basic PDS (7) using far strings.
>>Is there any way I can avoid this error.  Any and all help
>>will be appreciated!

When I have gotten this error in the past, I have almost always been able
to fix the error by simplifying the line BEFORE where the error occurred,
or by breaking that PRIOR line into two or more lines.

When I've gotten the error, I was only using PDS7.1, not assembly.

John


MAZE MAN COMPUTER SERVICES
MAZE MAN PUZZLE SERVICES
Box 202   Sulphur Springs, ARkansas 72768-0202



Thu, 26 Nov 1998 03:00:00 GMT  
 String Formula Too Complex

Quote:


>>This might be a faq, but I have a rather large application
>>written in MS Basic and Assembly which has been crashing
>>due to the "String Formula Too Complex" error.  

< S N I P >

Quote:
>To avoid it is kinda hard since it's not really general knowledge,
>or even mentioned in any of the documentation what actually
>constitutes a string formula that's too complex... <G>

>One possible solution that may help find the culprit is  to
>compile it and run it until it bombs out. Write down the address
>where it fails, then reassemble it with the /A switch.

>After the recompile, the /A switch will have created a file that
>you can search with a decent text editor for the offset that
>caused the problem.

I should have been more specific in my original post, but I have
identified the lines that cause the error and often they are trivial.  For
example, I cannot imagine how the following line could get any simpler:
T$ = T$ + "\"  And yet, this line, and other equally trivial lines have
supposedly caused the "String Formula Too Complex" error.  I would say
that I now get this error *every* time I use this program and it happens
in different places.

I am assuming that there is some temporary string storage space
that is getting over run.  The compiler guesses that it is due to
complex string formulas and produces that error.  I am also guessing
that there is some other type of data that can also impinge on
this hypothetical string space and produces this error for the same
reason but with different underlying causes.

Obviously I have a better imagination than I do knowlege of the
string handling code in PDS  :-)  but I was wondering if anyone
else knew why these errors occur and if they could be avoided
by changing the size of the stack or some similar technique.  

Anyway, thanks for the reply.  I know I am really stabbing in
the dark.

Bob Santore



Sun, 29 Nov 1998 03:00:00 GMT  
 String Formula Too Complex



Quote:


>This might be a faq, but I have a rather large application
>written in MS Basic and Assembly which has been crashing
>due to the "String Formula Too Complex" error.
>I am assuming that there is some temporary string storage space

 No, just the heap where strings are allocated and deallocated.

Quote:
>that is getting over run.  The compiler guesses that it is due to
>complex string formulas and produces that error.  I am also guessing
>that there is some other type of data that can also impinge on
>this hypothetical string space and produces this error for the same
>reason but with different underlying causes.
>Obviously I have a better imagination than I do knowlege of the
>string handling code in PDS  :-)  but I was wondering if anyone

                         ^^^

 Check your manual for info on NEAR strings or start using the
 function STRINGADDRESS() to pass a string pointer. BASIC does NOT
 pass ByValue unless implicitly told to, so you need to be expecting
 an address to a String descriptor which points to the string text
 in your asm code.

Quote:
>else knew why these errors occur and if they could be avoided
>by changing the size of the stack or some similar technique.
>Anyway, thanks for the reply.  I know I am really stabbing in
>the dark.
>Bob Santore




Mon, 30 Nov 1998 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. string formula too complex

2. "String Formula Too Complex"?

3. String formula too complex?

4. String formula too complex

5. String formula too complex error

6. String Formula Too Complex Error

7. VB3.0 : String formula too complex

8. String formula too complex

9. String formula too complex

10. String Formula Too Complex

11. Complex String Manipulation - Well Complex For Me Anyway

12. Complex number formulas someone wanted...

 

 
Powered by phpBB® Forum Software