Microsoft KB Archive/39577

= DRAW &quot;Illegal Function Call&quot; In .EXE Compiled with BC /D =

Article ID: 39577

Article Last Modified on 11/21/2006



This article was previously published under Q39577



SYMPTOMS
The program example below will draw a large number 1 on the screen. This program works correctly under QB.EXE and as a .EXE program when compiled WITHOUT the debug option.

The program causes an &quot;Illegal function call&quot; at run time if compiled using the debug option (BC /D). The program can be modified to work correctly by using a single variable-length string instead of an element of a variable-length string array, i.e., B$ instead of A$(x) and by not using the VARPTR$ FUNCTION. The following two statements will execute identically:

DRAW &quot;X&quot; + VARPTR$(A$(1))

DRAW A$(1)



STATUS
Microsoft has confirmed this to be a bug in QuickBasic Versions 4.00, 4.00b, and 4.50 and in the Basic Compiler Versions 6.00 and 6.00b (buglist6.00, buglist6.00b) for MS-DOS and OS/2. The program works correctly in QuickBasic Version 3.00. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

The following is a code example: DIM a$(65) a$(17) = &quot;BU6BR2NG1D6L1R2BR4&quot; SCREEN 1 DRAW &quot;BM52,52;s24;c1&quot; DRAW &quot;x&quot; + VARPTR$(a$(17)) INPUT x$ END

Additional query words: QuickBas BasicCom buglist4.00 buglist4.00b buglist4.50

Keywords: KB39577

-

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

© Microsoft Corporation. All rights reserved.