Microsoft KB Archive/72681

= &quot;String Formula Too Complex&quot; Using UCASE$(COMMAND$) =

Article ID: 72681

Article Last Modified on 8/16/2005

-

APPLIES TO


 * Microsoft BASIC Professional Development System 7.0
 * Microsoft BASIC Professional Development System 7.1

-



This article was previously published under Q72681



SYMPTOMS
When you repeatedly invoke the UCASE$ function using the COMMAND$ function as its argument, a &quot;String Formula Too Complex&quot; error can occur.



STATUS
Microsoft has confirmed this to be a bug with Microsoft Basic Professional Development System (PDS) versions 7.0 and 7.1 for MS-DOS. This problem was corrected in Microsoft Visual Basic version 1.0 for MS-DOS.

To work around the problem, assign COMMAND$ to a temporary string variable, and pass the temporary string variable to the UCASE$ function.



MORE INFORMATION
The following program reproduces this problem:

Code Example
CLS FOR i% = 1 to 100 LOCATE 1, 1: PRINT i%    temp$ = UCASE$(COMMAND$) NEXT i% END The above program will fail on the 21st iteration of the loop. To work around this problem, assign COMMAND$ to temp$ and then take the UCASE$ of temp$: temp$ = COMMAND$ temp$ = UCASE(temp$) NOTE: The problem also occurs if you replace UCASE$ with LCASE$.

Additional query words: VBmsdos BasicCom 7.00 7.10 b_vbmsdos 1.00 SR# S910522- 33 buglist7.00 buglist7.10 fixlist1.00

Keywords: KB72681

-

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

© Microsoft Corporation. All rights reserved.