Microsoft KB Archive/33049

= $OPTION Metacommand Is Similar to $LONG and $OPTION =

Article ID: 33049

Article Last Modified on 11/21/2006



This article was previously published under Q33049



SUMMARY
The $OPTION metacommand was introduced in Microsoft BASIC Compiler Version 1.00 for the Apple Macintosh. For upward compatibility, $OPTION is also supported in QuickBASIC Version 1.00 for the Apple Macintosh. The $OPTION metacommand instructs the compiler in the following ways:   Metacommand Option       Description --      ---

$OPTION A               Use long addressing mode

$OPTION +A              Use long addressing mode

$OPTION -A              Do not use long addressing mode

$OPTION C               Check array boundaries, and overflow

$OPTION +C              Check array boundaries, and overflow

$OPTION -C              Do not check array boundaries, and overflow The compiler in QuickBASIC for the Apple Macintosh also provides the $LONG metacommand to turn on and off long addressing and the $CHECK metacommand to turn on and off checking of array boundaries. Microsoft recommends using the new $LONG and $CHECK metacommands, which are easier to remember than $OPTION.

One QuickBASIC customer reported that he had selected &quot;Use Long Addressing&quot; in the Options dialog box but still received &quot;Must use long addressing mode&quot; error messages at compile time. The customer solved the problem by adding the metacommand REM $LONG directly into the source code.



MORE INFORMATION
QuickBASIC allows you to set various options that affect compilation. Most options are set for the entire source file by checking the appropriate boxes in the dialog box for the Options command on the Run menu. However, the $OPTION, $LONG, and $CHECK metacommands let you turn on or off the compiler option in specified parts of the source file.

The following two programs use equivalent metacommands to turn on checking of array boundaries and overflow conditions:

   REM $OPTION C   DIM ARR% (2, 2) ARR% (0, 0) = 1 END    REM $CHECK ON   DIM ARR% (2, 2) ARR% (0, 0) = 1 END 

Additional query words: BasicCom MQuickB

Keywords: KB33049

-

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

© Microsoft Corporation. All rights reserved.