Microsoft KB Archive/44758

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 09:20, 21 July 2020 by X010 (talk | contribs) (Text replacement - ">" to ">")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Base


FIX: "Type Mismatch" 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 "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
                


Additional query words: MQuickB

Keywords: kbbug kbfix KB44758