Microsoft KB Archive/45896

= Variable Names Starting with &quot;FN&quot; Give &quot;Syntax Error&quot; =

Article ID: 45896

Article Last Modified on 12/12/2003

-

APPLIES TO


 * Microsoft QuickBasic Compiler for Macintosh 1.0
 * Microsoft BASIC Interpreter 2.0
 * Microsoft BASIC Interpreter 2.1 for Macintosh
 * Microsoft BASIC Interpreter 3.0 for Macintosh

-



This article was previously published under Q45896



SUMMARY
Using a variable name that begins with the letters &quot;FN&quot; (capital or lowercase) results in a &quot;Syntax Error&quot; when you run the program or when you attempt to compile the program. To avoid this situation, use a different variable name.

This information applies to Microsoft QuickBASIC Version 1.00 for the Apple Macintosh System, Microsoft BASIC Interpreter Versions 2.00, 2.10, and 3.00 for the Apple Macintosh System, and Microsoft BASIC Compiler Version 1.00 for the Apple Macintosh System.

This is not considered a problem of any of these Microsoft products.



MORE INFORMATION
A variable that begins with the letters FN or fn is assumed to be a function that was previously defined with the DEF FN statement.

This is not directly stated in the manual, but it is implied in the DEF FN statement documentation (as on Page 98 of &quot;Microsoft QuickBASIC for Apple Macintosh: Language Reference.&quot;

To demonstrate a &quot;Syntax Error,&quot; enter a line of code that references a variable name that begins with &quot;FN&quot;. If you enter the variable name in lowercase letters, the &quot;FN&quot; is automatically capitalized by QuickBASIC. Run the program, and the line containing that variable name will be flagged as a &quot;Syntax Error&quot;; for example, the following statement generates the error: FNxt$ = &quot;hello&quot;

Additional query words: BasicCom MQuickB

Keywords: KB45896

-

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

© Microsoft Corporation. All rights reserved.