BUG: Undefined Subprogram CALLing Machine Language Using Long (61334)
This article was previously published under Q61334
SYMPTOMS
CALLing a machine-language routine using a long integer (&) for the
routine's address causes the QuickBasic Interpreter to produce the
"Undefined subprogram" error. Using a long for the address works
correctly in a compiled application.
To work around this problem, use a single-precision (!) or
double-precision (#) variable for the address of the machine-language
routine.
Microsoft has confirmed this to be a bug in Microsoft QuickBasic
version 1.00 for the Macintosh . We are researching this problem
and will post new information here in the Microsoft Knowledge Base as it
becomes available.
Code Example
The following code example produces an "Undefined subprogram" error in
the QuickBasic Interpreter but works correctly when compiled:
Code% = &H4E75 'equiv to RTS in assembly language
Ptr& = VARPTR(Code%) 'Ptr! or Ptr# works correctly
CALL Ptr& 'This line causes Undefined subprogram
PRINT "Call succeeds in application."
Modification Type: |
Minor |
Last Reviewed: |
1/9/2003 |
Keywords: |
kbbug KB61334 |
|