Consultor Eletrônico



Kbase P113470: DECIMALS option is ignored when used with parameters
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   24/02/2006
Status: Unverified

SYMPTOM(s):

Using DECIMALS option on parameters to modify the number of decimal places stored

The original, unmodified value is displayed when viewing the parameter

For example:

RUN proc.p (INPUT 123.456).

/* proc.p */
DEFINE INPUT PARAMETER iDe AS DECIMAL DECIMALS 2.
DISPLAY iDe FORMAT ">>>>>>9.999".

Expected Result: 123.4600
Actual Result: 123.4560

CAUSE:

This is a known issue being investigated by Development

FIX:

Option #1
Re-assign the value of the parameter to a variable that has the same DECIMALS setting:

DEF INPUT PARAMETER pD AS DECIMAL DECIMALS 2.
DEF VAR vDe AS DECIMAL DECIMALS 2.

vDe = pD.
DISPLAY vDe FORMAT ">>>>>>9.9999".

Result: 123.4600

Option #2
Use the ROUND function rather than relying on DECIMALS