It is also possible to extend that method to store multiple-choice data by using more than one bit. The database provided with this technical note is designed to be used in compiled mode. If you use the interpreted version, please keep in mind that its performance will be seriously impaired. It takes 32 bytes to store 32 boolean fields in 4D. Using the method described in this technical note, it would take only four bytes. Methods for encoding and decoding the data are compact and can be easily adapted from one application to the other.
Searches are faster but more complex.
Importing and exporting data becomes more complex. Searches become more complex. In the example described in this technical note, we will use a long integer to manage two groups of eight check boxes and two groups of eight radio buttons. Because of extensive use of pointers and bitwise operators, additional operations will be easy to implement. We first need to define the 32 longint variables that will be used in the form for the checkboxes and radio buttons.