FIX: "Type Mismatch" on Compile When SUBprogram Has >25 Params (44758)



The information in this article applies to:

  • Microsoft QuickBASIC Compiler for the Apple 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 "Type Mismatch" 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 "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
				

Modification Type:MinorLast Reviewed:1/9/2003
Keywords:kbbug KB44758