Subject Re: [IBO] IBO change-over
Author Helen Borrie
At 07:43 AM 02-05-01 -0700, you wrote:
>Thanks for everyone's replies, very helpful.
>
>one more question, since there is no boolean type, and I need to create a
>domain, is it better to have a char Y,N, or integer 1,0 to accomodate the
>use of checkboxes and boolean flags used in my application?
>
>are there advantages of one over the other method??

There is some insignificant difference in storage size - it's largely a matter of preference.

You would use a smallint for the 1,0 method. For a char(1) pair, 'T' & 'F' are more common than 'Y' and 'N' (would that be 'V' et 'F' en français?)

One argument in favour of the char(1) choice is that there is no doubt that T is True and F is false, whereas some people want 1 for False and 0 for True whilst rational minds expect it to be the other way around. Olden computalk used to have -1 for False and 0 for True (I seem to recall that's how it was in RPG for reading the settings of indicators). Anecdotal, not relevant. Sleep deprivation. :)

H.

All for Open and Open for All
InterBase Developer Initiative · http://www.interbase2000.org
_______________________________________________________