"Parameter Type Mismatch" with Variable Name Same as Parameter (77244)
The information in this article applies to:
- Microsoft QuickBASIC 4.0
- Microsoft QuickBASIC 4.0b
- Microsoft QuickBASIC 4.5
This article was previously published under Q77244 SYMPTOMS
The BC.EXE compiler incorrectly reports "Parameter type mismatch," and
possibly "Duplicate definition," when a module contains a variable in
the module level that has the same name as a parameter of a SUB or
FUNCTION statement in the same module and the following conditions are
met:
- The type of the variable in the module level and the parameter in
the SUB or FUNCTION are different.
- The variable is defined with "DIM <variable> as <type>".
- The parameter does not have an "AS <type>" clause.
To work around this problem, write the SUB or FUNCTION parameter with
an "AS <type>" clause.
STATUS
Microsoft has confirmed this to be a bug in BC.EXE in QuickBasic
versions 4.0, 4.0b, and 4.5. This problem was corrected in Microsoft
Basic Professional Development System (PDS) version 7.1 (fixlist7.10).
Modification Type: | Minor | Last Reviewed: | 1/8/2003 |
---|
Keywords: | KB77244 |
---|
|