Imported from previous forum
FIX is very explicit with how a boolean data type should be represented on the wire (Y or N), but FIXatdl is less so (and is actually confusing) when it comes to working with a ParameterType of Boolean_t, or when working with controls such as checkboxes that naturally lend themselves towards being associated with a boolean.
As far as i am aware FIXatdl does not make it explicit whether Boolean_t should be represented as 1/0, y/n, Y/N, true/false, True/False, TRUE/FALSE etc. In the examples in the spec the values of true\false are used, nut elsewhere in the spec where boolean attributes such as definedByFIX are described, it says the default value is False.
As an example of how this is confusing, if I want to set a checkbox to be checked by default should I set initValue to true, 1, Y etc? Similarly when using checkboxes to control the state of other controls, what should the StateRule be evaluating?
Whilst all of these are valid enough representations of a boolean, it doesn’t make it easy having to cast each one accordingly and it would be much easier for everybody if a single representation of Boolean_t was agreed upon.
From what I have seen true/false seems to be most common and 1/0 is been used, but I haven’t seen Y/N, so it looks as though the use of Boolean_t in FIXatdl has diverged from the boolean data type in FIX.
When sending via FIX I assume everybody is agreed upon Y/N, and using uncheckedWireValue and checkedWireValue on an EnumPair if something other than Y/N is required to be sent?
Thx. Neil
FIX is very explicit with how a boolean data type should be represented on the wire (Y or N), but FIXatdl is less so (and is actually confusing) when it comes to working with a ParameterType of Boolean_t, or when working with controls such as checkboxes that naturally lend themselves towards being associated with a boolean.
As far as i am aware FIXatdl does not make it explicit whether Boolean_t should be represented as 1/0, y/n, Y/N, true/false, True/False, TRUE/FALSE etc. In the examples in the spec the values of true\false are used, nut elsewhere in the spec where boolean attributes such as definedByFIX are described, it says the default value is False.
As an example of how this is confusing, if I want to set a checkbox to be checked by default should I set initValue to true, 1, Y etc? Similarly when using checkboxes to control the state of other controls, what should the StateRule be evaluating?
Whilst all of these are valid enough representations of a boolean, it doesn’t make it easy having to cast each one accordingly and it would be much easier for everybody if a single representation of Boolean_t was agreed upon.
From what I have seen true/false seems to be most common and 1/0 is been used, but I haven’t seen Y/N, so it looks as though the use of Boolean_t in FIXatdl has diverged from the boolean data type in FIX.
When sending via FIX I assume everybody is agreed upon Y/N, and using uncheckedWireValue and checkedWireValue on an EnumPair if something other than Y/N is required to be sent?
Thx. Neil
I would agree that it seems logical to agree upon a single standard and that it would make most sense to go with the existing standard found in the FIX protocol itself.