Consultor Eletrônico



Kbase P105527: 4GL/ABL: Is there a way to override the default maximum number of digits to the right of the decimal
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   12/10/2009
Status: Verified

GOAL:

4GL/ABL: Is there a way to override the default maximum number of digits to the right of the decimal point in a 4GL decimal variable?

GOAL:

How to implement decimal values with precision greater than 10 decimals ?

GOAL:

How to avoid "** Program variable decimals cannot be greater than 10. (343)" ?

FACT(s) (Environment):

Progress/OpenEdge Product Family
All Supported Operating Systems

CAUSE:

Enhancement Request# 000003274

FIX:

This Enhancement has not been implemented in the product.

A Progress/OpenEdge 4GL/ABL decimal variable is defined in terms of precision and scale. The precision of a decimal variable is the total of the number of its digits. The scale of a decimal variable is the number of digits to the right of its decimal point. The precision of a 4GL/ABL decimal variable is limited to 50 and its scale is limited to 10.

The Progress/OpenEdge 4GL/ABL does not offer native methods to extend the limit of either the precision or the scale of its decimal variables. To override the default 10 digit limitation on the scale of a decimal variable, the developer may:

1) Multiply the decimals by an appropriate power of 10. Do the calculation on the modified variables and adjust the result.

2) Use a third party math library with decimal scales more than 10. See P143683 for more information.

3) Store the decimals as two separate strings, one for the whole part and one for the decimal part, and define the appropriate math operations as desired.