string formula too complex 
Author Message
 string formula too complex

I use PDS 7.1, and have for a number of years. I've never had a problem I can't
isolate. Unfortunately, I can't find this one. This program reads data records
created in a random file from another program. I haven't had any problem before
with it. Anyway, it gets to a certain point and says "string formula too
complex". To debug, I assigned a bunch of constants to dedicated variables,
since I know what the computed values should be at that point. If I eliminate a
string function, it simply gives the same error on the next string function. The
program cycles through several records with no problem, though, before crapping
out. The problem also seems to propagate across called subroutines, too.
Wherever the next string function is, that's where it gives the error.

I compiled the sub where the error occurs now, and told it to produce an
assembler listing. Below is the section where it quits. It says it dies at
offset 06A8. All I can figure is something isn't being reset in the B$SCMP
routine which comes in the library. I use far strings, stand alone, alternate
math library. If anyone has had experience with this I'd appreciate whatever
remarks. In the meantime, I will continue plugging along.

Thanks

 065A   0006           IF MSOIOR(8,0,7,GK$) > 0 OR BB.PAT >< STRING$(10,"z") _
 065A   0006                   THEN
 065A   0006                           BB.PAT  = STRING$(10,"z")
 065A   0006                           BB.CYC  = "eeeeee"
 065A   0006                           FOR F1 = 0 TO 12
 065A    **        I00010:   mov     0FF3Ah[bp],0008h
 0660    **                  mov     0FF38h[bp],0000h
 0666    **                  mov     0FF36h[bp],0007h
 066C    **                  lea     ax,0FF3Ah[bp]
 0670    **                  push    ax
 0671    **                  lea     ax,0FF38h[bp]
 0675    **                  push    ax
 0676    **                  lea     ax,0FF36h[bp]
 067A    **                  push    ax
 067B    **                  lea     ax,0FF30h[bp]
 067F    **                  push    ax
 0680    **                  call    MSOIOR%
 0685    **                  mov     0FF34h[bp],ax
 0689    **                  cmp     word ptr 0FF34h[bp],00h
 068E    **                  jg      I00014
 0690    **                  push    ds
 0691    **                  push    offset BB
 0694    **                  mov     ax,000Ah
 0697    **                  push    ax
 0698    **                  call    B$LDFS
 069D    **                  push    ax
 069E    **                  push    0Ah
 06A0    **                  push    offset <const>
                                                                     PAGE  28
                                                                      28 Apr 97
                                                                      00:44:41
Offset  Data    Source Line           Microsoft (R) BASIC Compiler Version 7.10

 06A3    **                  call    B$STRS
 06A8    **                  push    ax
 06A9    **                  call    B$SCMP
 06AE    **                  jne     $+03h
 06B0    **                  jmp     I00011
 06B3    **        I00014:   push    0Ah
 06B5    **                  push    offset <const>
 06B8    **                  call    B$STRS

--
http://www.*-*-*.com/



Fri, 15 Oct 1999 03:00:00 GMT  
 string formula too complex

David,
I really don't know what is the problem!~
Rick


Quote:
>I use PDS 7.1, and have for a number of years. I've never had a problem I can't
>isolate. Unfortunately, I can't find this one. This program reads data records
>created in a random file from another program. I haven't had any problem before
>with it. Anyway, it gets to a certain point and says "string formula too
>complex". To debug, I assigned a bunch of constants to dedicated variables,
>since I know what the computed values should be at that point. If I eliminate a
>string function, it simply gives the same error on the next string function. The
>program cycles through several records with no problem, though, before crapping
>out. The problem also seems to propagate across called subroutines, too.
>Wherever the next string function is, that's where it gives the error.
>I compiled the sub where the error occurs now, and told it to produce an
>assembler listing. Below is the section where it quits. It says it dies at
>offset 06A8. All I can figure is something isn't being reset in the B$SCMP
>routine which comes in the library. I use far strings, stand alone, alternate
>math library. If anyone has had experience with this I'd appreciate whatever
>remarks. In the meantime, I will continue plugging along.
>Thanks
> 065A   0006           IF MSOIOR(8,0,7,GK$) > 0 OR BB.PAT >< STRING$(10,"z") _
> 065A   0006                   THEN
> 065A   0006                           BB.PAT  = STRING$(10,"z")
> 065A   0006                           BB.CYC  = "eeeeee"
> 065A   0006                           FOR F1 = 0 TO 12
> 065A    **        I00010:   mov     0FF3Ah[bp],0008h
> 0660    **                  mov     0FF38h[bp],0000h
> 0666    **                  mov     0FF36h[bp],0007h
> 066C    **                  lea     ax,0FF3Ah[bp]
> 0670    **                  push    ax
> 0671    **                  lea     ax,0FF38h[bp]
> 0675    **                  push    ax
> 0676    **                  lea     ax,0FF36h[bp]
> 067A    **                  push    ax
> 067B    **                  lea     ax,0FF30h[bp]
> 067F    **                  push    ax
> 0680    **                  call    MSOIOR%
> 0685    **                  mov     0FF34h[bp],ax
> 0689    **                  cmp     word ptr 0FF34h[bp],00h
> 068E    **                  jg      I00014
> 0690    **                  push    ds
> 0691    **                  push    offset BB
> 0694    **                  mov     ax,000Ah
> 0697    **                  push    ax
> 0698    **                  call    B$LDFS
> 069D    **                  push    ax
> 069E    **                  push    0Ah
> 06A0    **                  push    offset <const>
>                                                                      PAGE  28
>                                                                      28 Apr 97
>                                                                      00:44:41
>Offset  Data    Source Line           Microsoft (R) BASIC Compiler Version 7.10
> 06A3    **                  call    B$STRS
> 06A8    **                  push    ax
> 06A9    **                  call    B$SCMP
> 06AE    **                  jne     $+03h
> 06B0    **                  jmp     I00011
> 06B3    **        I00014:   push    0Ah
> 06B5    **                  push    offset <const>
> 06B8    **                  call    B$STRS
>--
>http://cust.iamerica.net/mcdivitt/



Fri, 15 Oct 1999 03:00:00 GMT  
 string formula too complex

Quote:
>David,
>I really don't know what is the problem!~
>Rick

I was calling a subroutine which updates a patient balance. The sub has 14
arguments. Zeros are passed in each argument, except the particular one being
updated. This sub is called many, many times, real fast, as it processes
automated records. It is the same sub used in real time, so all the record locks
have to be tested, etc.

For some reason, it craps out when processing one particular record in one
particular data file. Nothing about the data is significant. The program gives
an error saying "string formula too complex". By adding line numbers and using
TRON, it fails where it simply adds two strings together. By removing line
numbers, and viewing the offset in the assembler listing, it fails at the offset
I mentioned in my original message.

If I eliminate string functions, it will still just do so many then fail again
on a different statement. The failure may be in any subroutine, too.

To fix the problem I made an abbreviated version of the sub having 14 arguments.
Only three arguments are needed by this program. When used, there is no problem.
I don't like doing that because I want to know what caused the failure, because
another problem may turn up somewhere else. The original sub works fine in data
entry. This program was calling it intensively, which of course data entry would
never do. I'm thinking maybe because I called it so often with so many
arguments, a string formula counter wasn't being reset or something. The first
argument is a patient number, passed as a string, but when called it was done as
a computed value.

In string functions, concatenations and parenthesis are counted. When there are
too many it will say "string formula too complex". My sub was failing when just
one string was added to another. All I can figure is I was completing a string
operation in such a way, that the concatenation count wasn't getting reset.

--
http://cust.iamerica.net/mcdivitt/



Sat, 16 Oct 1999 03:00:00 GMT  
 string formula too complex


Quote:
(David G. McDivitt) writes:
>I use PDS 7.1, and have for a number of years. I've never had a
>problem I can't isolate. Unfortunately, I can't find this one. This
>program reads data records created in a random file from another
>program. I haven't had any problem before with it.
>Anyway, it gets to a certain point and says "string formula too
>complex".

Is it crashing on every data file you use or just a certain
one ? try checking the data file.

Have you made any recent changes to data file format or
the code i.e. you changed a sub which you thought would
have no direct bearing on the routine causing the problems,
this has caught me out a few times :(

TTfn,

Craig Wright___



Sun, 17 Oct 1999 03:00:00 GMT  
 string formula too complex

Quote:
>Is it crashing on every data file you use or just a certain
>one ? try checking the data file.

>Have you made any recent changes to data file format or
>the code i.e. you changed a sub which you thought would
>have no direct bearing on the routine causing the problems,
>this has caught me out a few times :(

I have a system set up where I can restore all changes to all source, back to
any point in the last four years and recompile. I think it's just a bug. I've
only found one other bug, and that's when redimensioning string arrays back to a
fewer number of elements. Programs crash if data is preserved, and the number of
elements is two less than the original. I haven't tried it with numeric arrays.
Overall, I think it has been a very good and sturdy language, which differs from
earlier days of programming, when the possibility of compiler bugs had equal
precedence with that of my own logic errors.

--
http://cust.iamerica.net/mcdivitt/



Sun, 17 Oct 1999 03:00:00 GMT  
 string formula too complex

David -
     "String... too complex" almost always means that you've run out of
temporary descriptors.  There are 20 temp descriptors available, allowing
up to 19 deferred or nested operations.  Concatenating 20 strings in one go
will cause this, as will a few other things.  In your code I don't see
that, but if you enter this procedure with, say, 18 deferred or nested
string operations, adding "just one more" could cause it to blow up.

                -- Jim

Quote:

> I use PDS 7.1, and have for a number of years. I've never had a problem I
can't
> isolate. Unfortunately, I can't find this one. This program reads data
records
> created in a random file from another program. I haven't had any problem
before
> with it. Anyway, it gets to a certain point and says "string formula too
> complex". To debug, I assigned a bunch of constants to dedicated

variables,


Mon, 18 Oct 1999 03:00:00 GMT  
 string formula too complex


Quote:
(David G. McDivitt) writes:
>>Have you made any recent changes to data file format or
>>the code
<snip>
>I have a system set up where I can restore all changes to all
>source, back to any point in the last four years and recompile

Wow ! that's taking version control a bit far :)

Quote:
> I think it's just a bug. I've only found one other bug, and that's
> when redimensioning string arrays back to a fewer number
> of elements.

There's bound to be more, I vaguely re-collect something
about problems with the overlay manager and a certain
number of segments causing crashes.

Perhaps you should check out MSs web site to see
if they've got anything on your problem.

TTfn,

Craig Wright___



Tue, 19 Oct 1999 03:00:00 GMT  
 string formula too complex

I tried that. It's a waste of time. The only thing Microsoft supports is what
they currently push.

--------------------------------

Quote:
>>Have you made any recent changes to data file format or
>>the code
<snip>
>I have a system set up where I can restore all changes to all
>source, back to any point in the last four years and recompile

Wow ! that's taking version control a bit far :)

Quote:
> I think it's just a bug. I've only found one other bug, and that's
> when redimensioning string arrays back to a fewer number
> of elements.

There's bound to be more, I vaguely re-collect something
about problems with the overlay manager and a certain
number of segments causing crashes.

Perhaps you should check out MSs web site to see
if they've got anything on your problem.

--
http://cust.iamerica.net/mcdivitt/



Mon, 25 Oct 1999 03:00:00 GMT  
 string formula too complex

Thanks for that bit of info. I think my problem is some temporary descriptors
aren't being released. I don't know why. The right combination just occurred
somehow. All subs are entered and exited many times before it happens.

--------------------------------------

David -
     "String... too complex" almost always means that you've run out of
temporary descriptors.  There are 20 temp descriptors available, allowing
up to 19 deferred or nested operations.  Concatenating 20 strings in one go
will cause this, as will a few other things.  In your code I don't see
that, but if you enter this procedure with, say, 18 deferred or nested
string operations, adding "just one more" could cause it to blow up.

                -- Jim

--
http://cust.iamerica.net/mcdivitt/



Mon, 25 Oct 1999 03:00:00 GMT  
 
 [ 9 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