Contents Index Version numbers and compatibility A DBTools example

ASA Programming Guide
  The Database Tools Interface
    Using the database tools interface

Using bit fields


Many of the DBTools structures use bit fields to hold Boolean information in a compact manner. For example, the backup structure has the following bit fields:

a_bit_field      backup_database   : 1;
a_bit_field      backup_logfile   : 1;
a_bit_field      backup_writefile: 1;
a_bit_field      no_confirm   : 1;
a_bit_field      quiet      : 1;
a_bit_field      rename_log   : 1;
a_bit_field      truncate_log : 1;
a_bit_field      rename_local_log: 1;

Each bit field is one bit long, indicated by the 1 to the right of the colon in the structure declaration. The specific data type used depends on the value assigned to a_bit_field, which is set at the top of dbtools.h, and is operating system-dependent.

You assign an integer value of 0 or 1 to a bit field to pass Boolean information to the structure.


Contents Index Version numbers and compatibility A DBTools example