DRAW "Illegal Function Call" In .EXE Compiled with BC /D (39577)
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 "Illegal function call" 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 "X" + 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) = "BU6BR2NG1D6L1R2BR4"
SCREEN 1
DRAW "BM52,52;s24;c1"
DRAW "x" + VARPTR$(a$(17))
INPUT x$
END
Modification Type: |
Minor |
Last Reviewed: |
1/9/2003 |
Keywords: |
KB39577 |
|