The #pragma options directive allow you to enable / disable certain compiler options for a range of code.
#pragma options( "option", state )
Note: #pragma directives must appear between before the first entity or between entities and cannot appear in the middle of an entity
"option" can be one of the following (please note that not all compiler options can be used)
Option |
Description |
"az" |
Zero based arrays |
"allowdot" |
Allow Dot for Instance Members |
"enforceoverride" |
Enforce the use of the OVERRIDE keyword |
"enforceself" |
Enforce SELF to access fields / properties / methods |
"fovf" |
Overflow checking (duplicate of "ovf") |
"initlocals" |
Initialize local variables |
"lb" |
Allow late binding |
"memvars" |
Allow dyamic memory variables (PUBLIC, PRIVATE, MEMVA |
"namedargs" |
This option cannot be set with the #pragma keyword |
"ovf" |
Overflow checking (duplicate of "fovf") |
"undeclared" |
Allow undeclared variables |
"vo1" |
This option cannot be set with the #pragma keyword |
"vo2" |
Initialize string variables with empty strings |
"vo3" |
All instance members virtual |
"vo4" |
Implicit Signed / Unsigned conversions |
"vo5" |
Implicit Clipper Calling convention |
"vo6" |
Implicit pointer conversions |
"vo7" |
Implicit Casts and Conversions |
"vo8" |
This option cannot be set with the #pragma keyword |
"vo9" |
Allow missing return statements or missing return values |
"vo10" |
Compatible IIF Behavior |
"vo11" |
Compatible numeric conversions |
"vo12" |
Clipper Integer divisions |
"vo13" |
Compatible String Comparisons |
"vo14" |
Embed real constants as float |
"vo15" |
Allow untyped locals |
"vo16" |
Generate Clipper Calling Convention default constructors |
"vo17" |
Clipper/VO Compatible Begin Sequence .. End Sequence |
"fox2" |
Foxpro Compatible Array Handling |
"xpp1" |
This option cannot be set with the #pragma keyword |
State can be one of the following
•on
•off
•default
Please note that you can also enable / disable overflow checking with BEGIN CHECKED .. END / BEGIN UNCHECKED .. END