Consultor Eletrônico



Kbase 12773: Rounding: differences in database field vs variable field
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
Rounding: differences in database field vs variable field


Differences in rounding between database fields and variable fields.


An example would be: database field 9.19
variable field 9.18


The reason for this is that the rounding takes place whenever
a result is stored into a variable or database field based on
the specified of default number of stored decimal places. In
the case of variables, the default is 10 places for the devimal
variables. (Language Tutorial, 5-22) In the case of decimal
database fields you specify the number of stored decimal places.
The dictionary displays a default of two decimal places on the field
definition screen and you can override it when you define the field.

If in your program you add DECIMALS 2 to the variable definition
you will get the same result as the field (which undoubtedly is
defined as 2 places in your example).

Progress Software Technical Support Note # 12773