Microsoft KB Archive/38498

= &quot;Expression Too Complex&quot; Error when Compiling with BC.EXE =

Article ID: 38498

Article Last Modified on 11/21/2006



This article was previously published under Q38498



SYMPTOMS
The program below, which runs properly inside the QuickBasic Version 4.50 environment, will generate an &quot;Expression too complex&quot; error message when compiled with BC.EXE.



STATUS
Microsoft has confirmed this to be a bug in BC.EXE in QuickBasic Version 4.50. We are researching this problem and will post new information as it becomes available.

The program compiles and executes properly in Microsoft QuickBasic Versions 4.00 and 4.00b.



MORE INFORMATION
When the program listed below is compiled using BC.EXE, either from the DOS command line, or from the QuickBasic environment with &quot;Make .EXE File...&quot; option, an &quot;Expression too complex&quot; error message is generated on the END SUB statement. The problem does not occur if the expression in the subprogram is simplified in any way (such as breaking the expression into two parts, using temporary variables, etc.), or if the array values in the subprogram are SHARED rather than passed as parameters.

To avoid the problem, either break the expression in the subprogram down, using multiple expressions and temporary variables, or make the arrays SHARED rather than passed to the subprogram as parameters.

The following is a code example: DEFINT A-Z DECLARE SUB cd (cur, c, b, sn, l) DIM b(10), c(1, 10), cur(10, 2, 1, 6) DIM l(10) PRINT &quot;This is a test.&quot; END 'Note that the subprogram does NOT have to be CALLED 'to reproduce the problem SUB cd (cur, c, b, sn, l) mp = cur(l(sn), 0, 1, c(0, sn)) - 1 END SUB

Additional query words: QuickBas buglist4.50

Keywords: KB38498

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.