Page 1 of 1

Severe Error: Expression too complex!

Posted: Wed Oct 01, 2003 1:59 am
by Guest
Help!

I wrote a QBasic program (.bas) that runs fine inside the QBasic 4.5 interpreter but fails to compile (.exe).

One (1) severe error is given indicating "expression too complex ??? I have tried al sorts of modifications using subroutines and rewriting expressions but problem could not be fixed so far.

Looking for some QuickBasic expertise from self proclamed experts!

Pleun Troost
(407) 247-0756

Re: Severe Error: Expression too complex!

Posted: Wed Oct 01, 2003 10:40 pm
by Afrow_UK
I think this is what I get also on my SearchFile% function.
It's stopping the compiler build an exe, but it runs fine.

-Stu

Re: Severe Error: Expression too complex!

Posted: Wed Dec 03, 2003 2:26 am
by GPfault
See if you can perform the computation in stages.  Use some intermediate variables.  A few little chunks are more managable than one huge chunk.
For instance a+b* 123-SQR(72+4^a)*LOG(b)*(23^a ----1)
could be split up as follows:

temp1 = (72+4^a)
temp2 = (23^a ----1)
temp3 = SQR(temp1)*LOG(b)*temp2
answer = a + b*123 - temp3
And there you have it.  Same answer.  Just pay attention to order of operations.