Hello,
I have a variable which is named number, my variable is of type integer. And I have a second variable which is named total. This variable is of type "floating".
I have to multiply by 0.10, the variable 'number' and store the result in the variable 'total'.
So, the resultat is 5 * 0.10 = 0.50
On AS400 I get only the value .50 instead of 0.50
52qt.png (see image)
I saw the doc below, but I don't understand... There are several ways to manipulate a floating?
https://www.rpgpgm.com/2018/06/diffe...rs-in-rpg.html
Do you have an idea please?
Thank you for your help.
I have a variable which is named number, my variable is of type integer. And I have a second variable which is named total. This variable is of type "floating".
I have to multiply by 0.10, the variable 'number' and store the result in the variable 'total'.
Code:
total = number * 0.10;
On AS400 I get only the value .50 instead of 0.50
52qt.png (see image)
I saw the doc below, but I don't understand... There are several ways to manipulate a floating?
https://www.rpgpgm.com/2018/06/diffe...rs-in-rpg.html
Do you have an idea please?
Code:
**FREE dcl-s number int(3) inz(5); dcl-s total packed(5:2); total = number * 0.10; dsply %Char(total) ; *inlr = *on;
Thank you for your help.
Comment