Default Field Option Settings

When you create or define a field, the field options are set by copying the default field option settings that are part of the environment. There are separate default option settings for each field type. The system defaults for each field type can be found in the _fldinfo[] array in the header file vv_main.h. Table 9.3 lists each field type and which field options are set ON.

Table 9.3: Default Field Option Settings for Each Type of Data Field

Field Types Default Field Option Settings
F_BOOL None
F_CHAR None
F_CHECK None
F_DATE TRAILBLANKS
F_DECIMAL CLEARONKEY | RTADJUST
F_DOUBLE CLEARONKEY | RTADJUST
F_INT CLEARONKEY | RTADJUST
F_LONG CLEARONKEY | RTADJUST
F_RADIO None
F_SHORT CLEARONKEY | RTADJUST
F_SINGLE CLEARONKEY | RTADJUST
F_STRING None
F_TIME TRAILBLANKS

Designer: You can change the default field options by modifying the Designer configuration file. Any fields that you create after changing the defaults will have these options. Previously created fields will not use the new defaults.

Code: You can change the default field options. If you change the default options, any field of that type defined after changing the defaults will have these options. Previously-defined fields will not use these defaults. To change the default field options, use:

void se_fldopt(fld_type, options)

int fld_type;        /* Field type to change defaults for        */

long options;        /* Options to use for defaults            */

All options not specified in this call are set to OFF. If you want to turn off all field options for a particular field type, specify 0L for the options.

For example, to set the default options for decimal fields to BLANKONZERO, CLEARONKEY and RTENTRY:

se_fldopt(F_DECIMAL, BLANKONZERO | CLEARONKEY | RTENTRY);

Any decimal field defined after making this call will be initially assigned these three options by default.


Home Contents Previous Next