

C Proxy › Proxy Function Prototypes › API Variable Types › Decimal Precision Attributes
Decimal Precision Attributes
The data structure for this attribute is a DPrec array whose size is the length of the attribute plus 3 (for the sign, decimal point, and null terminator). A DPrec is a typedef of char. For example, an attribute that is defined as a number of 18 digits will be implemented as DPrec[21].
The number represented within the DPrec array may consist of the following depending upon the definition of the attribute it implements:
- A minus sign.
- Zero or more decimal digits with a decimal point, one or more decimal digits without a decimal point.
- A decimal point.
- One or more decimal digits.
- A null terminator.
For the import view, all decimal precision attributes should adhere to the following rules:
- The character representation of the number placed in the DPrec array may contain a fewer number of digits than that defined for the attribute. However, it must not contain more digits to the left or right of the decimal than that defined for the attribute.
- The DPrec array must be null terminated.
- If number of digits to the right of the decimal equals the total number of digits, the resulting string must not contain a leading zero prior to the decimal point.
For the export view, a decimal precision attribute may be its simplest form or may contain a plus sign and/or leading and trailing zeros.
Copyright © 2015 CA Technologies.
All rights reserved.
 
|
|