Microsoft KB Archive/44758
Article ID: 44758
Article Last Modified on 1/9/2003
- Microsoft QuickBasic Compiler for Macintosh 1.0
This article was previously published under Q44758
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 "Type Mismatch" is displayed. The program runs correctly within the environment.
Possible workarounds for this problem are the following:
- Using the SHARED statement in the SUBprogram to allow the program access to the variables, instead of passing them as parameters.
- 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.
The following program generates a "Type Mismatch" 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 "Made it!" END SUB
Additional query words: MQuickB
Keywords: kbbug kbfix KB44758