Yes. Use prime numbers, multiply them together, then factor them out.
- The field type to use is integer or large integer
- Use code values that are prime numbers
- 3 == English
- 5 == French
- 7 == Spanish
- 11 == Italian
- Store the product of all that apply into the field.
- 21 == English and Spanish
- 385 == French, Spanish and Italian
Use modulo functions to determine which values are in the field
if ( field % 3 == 0 ) { english() ;}
if ! (field % 5) { french() ;}
=IF(NOT(MOD(A203,5)),"French","")
- The same value can appear multiple times
I first used this technique to store dimensions.
- 3 == time
- 5 == length
- 7 == mass
- 11 == charge
- 13 == temperature
- 17 == moles
For example, a "first moment" lever-arm would have a dimension value of 35 == mass * length.
To store fractional dimensions in an integer, I multiplied fractional dimensions by the product of all of them and dealt with it in processing.
- 255255 == 3*5*7*11*13*17
- force == mass * length / (second^2)
- force == ( 7 * 5 / ( 3 * 3 ) ) * 255255 * 255255
- force == 253381002875
The reason I used integers was to avoid dealing with invalid equality comparisons due to rounding errors.
Please do not ask for the code to extract the fractional dimensions. All this was 40 years ago in APL/360.