Data Type Validation

Imported from previous forum

[ original email was from Ranjit M - ranjit_unni@yahoo.com ]
Hi,

The 4.2 spec defines Qty, Price and Amt as float fields, but, does not explicitly mention whether the Qty, Price and Amt fields can hold a -ve (negative) value.

Can i assume safely that the said fields can indeed take -ve values (by virtue of them deriving from float), though i am not sure of the products where this would be required.

Thanks in advance,

Ranjit

[ original email was from Himanshu Sharma - himanshu_sharma@rsco.com ]
On the first page of FIX4.2 specs, Data-Type float is defined as:
ยท float: Sequence of digits with optional decimal point and sign character (ASCII characters "-", "0" - "9" and "."); the absence of the decimal point within the string will be interpreted as the float representation of an integer value. All float fields must accommodate up to fifteen significant digits. The number of decimal places used should be a factor of business/market needs and mutual agreement between counterparties.

Hence a float can be negative.
> Hi,
>
> The 4.2 spec defines Qty, Price and Amt as float fields, but, does not explicitly mention whether the Qty, Price and Amt fields can hold a -ve (negative) value.
>
> Can i assume safely that the said fields can indeed take -ve values (by virtue of them deriving from float), though i am not sure of the products where this would be required.
>
> Thanks in advance,
>
> Ranjit
>