Microsoft KB Archive/44758

= FIX: &quot;Type Mismatch&quot; on Compile When SUBprogram Has >25 Params =

Article ID: 44758

Article Last Modified on 1/9/2003

-

APPLIES TO


 * Microsoft QuickBasic Compiler for Macintosh 1.0

-



This article was previously published under Q44758



SYMPTOMS
The program shown below demonstrates that a compiled Macintosh QuickBasic program can pass only 25 parameters to a SUBprogram. If more then 25 parameters are passed, the error message &quot;Type Mismatch&quot; is displayed. The program runs correctly within the environment.

Possible workarounds for this problem are the following:
 * 1) Using the SHARED statement in the SUBprogram to allow the program access to the variables, instead of passing them as parameters.
 * 2) Assigning several of the variables to be passed to an array, then passing the array in place of the variables.

Microsoft has confirmed this problem in Microsoft QuickBasic version 1.00 for Macintosh Systems. This problem is corrected in QuickBasic version 1.00b.



MORE INFORMATION
The following program generates a &quot;Type Mismatch&quot; error at compile time: ' Sub Test DEFINT A-Z

CALL TEST(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) END

SUB TEST(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) PRINT &quot;Made it!&quot; END SUB

Additional query words: MQuickB

Keywords: kbbug kbfix KB44758

-

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

© Microsoft Corporation. All rights reserved.