Microsoft KB Archive/57376

= FIX: Passing PEEKL to a SUBprogram Returns &quot;Type Mismatch&quot; =

Article ID: 57376

Article Last Modified on 11/21/2006



This article was previously published under Q57376



SYMPTOMS
Using the PEEKL function as an argument for a SUBprogram that accepts a LONG data type produces a &quot;Type mismatch&quot; error when run from within the QuickBasic Interpreter.

Compiling the program and running the application does not produce the error.

To work around this problem, assign the result of the PEEKL function to a temporary variable and then pass this through the argument list of your SUBprogram.

Microsoft has confirmed this to be a bug in Microsoft QuickBasic version 1.00 for the Macintosh. This problem is corrected in QuickBasic version 1.00b.



Code Example
The following code produces the error in the interpreter: CALL ArgPass(PEEKL(10000))    ' &quot;TYPE MISMATCH&quot; error here END SUB ArgPass(longArg&) STATIC PRINT longArg& END SUB The following is a workaround: temp& = PEEKL(10000) CALL ArgPass(temp&) END SUB ArgPass(longArg&) STATIC PRINT longArg& END SUB

Additional query words: MQuickB

Keywords: kbbug kbfix KB57376

-

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

© Microsoft Corporation. All rights reserved.