compiler problem - "expression too complex"

Please use this Board for QBasic related requests ( file research, programming, etc.)

Moderators:Administrator, Global Moderator

Post Reply
dickbuck
Newbie
Posts:2
Joined:Mon Apr 28, 2003 10:09 pm
compiler problem - "expression too complex"

Post by dickbuck » Wed Aug 17, 2005 5:08 pm

When I try to compile a perfectly working source program I get the following message during compile as a serious error:

BC C:\BARDLAPL\M404BARD.BAS/O/T/C:512;
Microsoft (R) QuickBASIC Compiler Version 4.50
(C) Copyright Microsoft Corporation 1982-1988.
All rights reserved.
Simultaneously published in the U.S. and Canada.


17A6 086A FOR icx = 2 TO in
^ Expression too complex

43869 Bytes Available
33587 Bytes Free

0 Warning Error(s)
1 Severe Error(s)

Press any key to continue

if I rem out the for...next lines and re compile the error just moves to the next assignment statement.

Any idea as to what causes this problem? I dont have a manual which discusses compiler errors.

Thanks...

Valerie
Sr. Member
Posts:54
Joined:Wed Dec 15, 2004 8:10 am
Location:Coromandel, NZ

It happens

Post by Valerie » Thu Aug 18, 2005 3:32 am

The BC compiler has some hard to explain limitations and you've come across one of them. The command/statement following the For is the one causing the problem. You can try simplifying your code but without knowing what the code is it's hard to be specific.

buff1

Post by buff1 » Thu Aug 18, 2005 12:54 pm

I've found that where the error points is not always the exact position of
the error. I would check long statements involving multiple commands or
statements like (as a rudimentary example)

left$(mid$(right$(A$+right$(mid$(B$,1),3,1),2,1),2,1),4)

(not checked for validity)

Dr_Davenstein
QBasic God
Posts:166
Joined:Tue Mar 25, 2003 12:45 am
Location:U.S.A.
Contact:

Post by Dr_Davenstein » Fri Aug 19, 2005 7:46 am

I'm almost certain that Buff is right. However, you should be able to compile it from the command line. Does anyone have a copy of the command line options lying around? I don't have QB on this pc. :?
Come check out [url=http://www.freebasic.net/forum/index.php]FreeBASIC[/url]. The syntax is based on QuickBasic, but it expands to use pointers, operator overloading, etc... The list goes on and on!

Valerie
Sr. Member
Posts:54
Joined:Wed Dec 15, 2004 8:10 am
Location:Coromandel, NZ

Well, I think

Post by Valerie » Sat Aug 20, 2005 4:45 am

that unless a different compiler is used from the command line the results will be the same. Note that the OP shows that the BC compiler is being used & I don't think another compiler is bundled with QB. The reason I say this is that I have had more than one failure to compile a prog which successfully runs in the IDE, using the command line or not. Most of the problems have been caused by using QB commands which, in the Help file, are not flagged as being unacceptable to the BC compiler.

However, as a get out of jail, I admit I have been wrong before this & will be wrong again.

Regards to all

V...

Valerie
Sr. Member
Posts:54
Joined:Wed Dec 15, 2004 8:10 am
Location:Coromandel, NZ

Dr.D

Post by Valerie » Sat Aug 20, 2005 5:27 am

Sorry, forgot to answer your query about BC compiler command-line options. I have a supposedly complete list covering Basic and PDS but it's probably a bit too long to post here. If you will accept by e-mail I can send either as plain-text in e-mail or attach as .zip file. Please advise by pm.

Anyone else who would like a copy can pm me with e-mail addy and preference.

Post Reply