"Variable Name Not Unique" if Variable Name Same as Parameter (81453)
The information in this article applies to:
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0b
- Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.0
- Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.1
- Microsoft QuickBASIC 4.0
- Microsoft QuickBASIC 4.0b
- Microsoft QuickBASIC 4.5
This article was previously published under Q81453 SYMPTOMS
The BC.EXE compiler incorrectly reports "Variable name not unique"
when a module contains the following, in order:
- In the module level, a string constant that ends with a period
character. For example, any one of the following statements:
PRINT ".";
a$ = "abc."
c = ASC(".")
CHDIR ".." - In the module level, a variable that was not declared with "DIM
<variable> AS <type>". For example, one of the following
statements:
y = 1
PRINT y - In a SUB or FUNCTION procedure, a parameter declared with "DIM
<parameter> AS <user-type>," where <parameter> has the same name as
the variable in the module-level and <user-type> is a user-defined
type name. For example:
SUB s (y as userType)
STATUS
Microsoft has confirmed this to be a bug in the BC.EXE compiler of
Microsoft Basic Compiler versions 6.0 and 6.0b; Microsoft Basic
Professional Development System (PDS) versions 7.0 and 7.1; and QuickBasic
versions 4.0, 4.0b, and 4.5. We are researching this problem and will post
new information here in the Microsoft Knowledge Base as it becomes
available.
Modification Type: | Minor | Last Reviewed: | 1/8/2003 |
---|
Keywords: | KB81453 kbAudDeveloper |
---|
|