On Jun 6, 2007, at 2:58 AM, Tim Mansour wrote:
Assuming an implementation in one byte, that is.
Well actually a binary type could be stored in as little as a
single bit.
It could, but the FMP file format doesn't provide for bit level
storage of field values. There likely wouldn't be any value to doing
so either given the storage overhead of mapping bits to corresponding
records. Were we talking variables in a compiled program rather than
database columns that would be different.
One must take care, when using this convention, that calculations
looking for a "False" value have the "Do not evaluate if all
referenced fields are empty" checkbox unchecked or are testing for
false using the "IsEmpty()" function.
... or you can test against the calculation "field * 1"
Unless you uncheck the "Do not evaluate..." checkbox, "field * 1"
evaluates as null if "field" is null. I also think it better that
calculation formulae be as transparent as is reasonable; I formerly
used the convention "field * 1" myself but have since abandoned it
for a style that I find to be more explicit. To that end, the
"GetAsBoolean()" function is your friend here - it will allow you to
test for true/false values in a field, empty or not, irrespective of
the "Do not evaluate..." checkbox state.
Corn Walker
Hatfield, MA