Microsoft KB Archive/40859

= Cannot Use FN at Beginning of SUB or Variable Names =

Article ID: 40859

Article Last Modified on 11/21/2006

-

APPLIES TO


 * Microsoft QuickBasic 2.0
 * Microsoft QuickBasic 2.01
 * Microsoft QuickBasic 3.0
 * Microsoft QuickBasic 4.0
 * Microsoft QuickBASIC 4.0b
 * Microsoft QuickBasic 4.5 for MS-DOS
 * Microsoft BASIC Compiler 6.0
 * Microsoft BASIC Compiler 6.0b
 * Microsoft BASIC Professional Development System 7.0

-



This article was previously published under Q40859



SUMMARY
In Microsoft QuickBasic, the FN character combination is reserved for user-defined functions created with the DEF FN statement. Variable names, SUBprogram procedure names, and function procedure names defined with the FUNCTION statement may NOT use FN as the first characters in the name.

Depending on usage, QuickBasic can give you errors such as the following when you incorrectly use FN in a name:

Duplicate definition

Invalid identifier

Cannot start with FN

Function not defined

The variable, SUBprogram, or FUNCTION should be renamed so that it does not start with the FN character combination.

This information applies to Microsoft QuickBasic Versions 2.00, 2.01, 3.00, 4.00, 4.00b, and 4.50, to Microsoft Basic Compiler Versions 6.00 and 6.00b for MS-DOS and MS OS/2, and to Microsoft Basic PDS Version 7.00 for MS-DOS and MS OS/2.

More information on the DEF FN statement can be found in the Microsoft Basic language reference manual for your version of Basic or QuickBasic.

Additional query words: QuickBas BasicCom

Keywords: KB40859

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.