Rouding

Author: bignonj@gmail.com (Bignon)

hi,

I want set my local numeric variable with this number : 3.418

but the variable is setting with : 3.42

I try with numeric and float type, with too DIS(ZZ9PZZZ) in the shortland...

 

Thanks for your help !

 

 

2 Comments

  1. Hi Jérôme,

    Since you mention using a display format I suppose we're talking about component variables here (used to be named Local variables I think, but that was Uniface 6 and before).

    I did a quick test on an empty form (Uniface 7.2.06), creating a local variable of the numeric type and one of the floating point type, both with Display Format DIS(ZZ9PZZZ). I entered the following lines in the execute trigger:

    $CV_NUM$ = 3.418
    $CV_FLP$ = 3.418
    message "$CV_NUM$ = %%$CV_NUM$%%%, $CV_FLP$ = %%$CV_NUM$%%%"
    edit
     

    During run time this message then displays: $CV_NUM$ = 3.418, $CV_FLP$ = 3.418, as expected. So... no problems here.
     

    Did you use the notation with the percent signs (%) as I did above?

    Best regards,

    Arjen


    Author: Arjen van Vliet (arjen.van.vliet@uniface.com)
  2. Oups, it's ok. The error is from me.

    Thanks Arjen for your help.


    Author: Bignon (bignonj@gmail.com)