‎2008 Mar 03 2:10 PM
Hi Experts,
How can i print the rounded values :
Example : x = 739.365
I want it to be printed as
739.4
Thanks in Advaance
‎2008 Mar 03 2:12 PM
hi
DATA N TYPE P DECIMALS 2.
DATA M TYPE P DECIMALS 2 VALUE '5.55'.
N = FRAC( M ).
IF N > 0.5.
N = FLOOR( M ). WRITE: / 'FLOOR:', N.
ELSE.
N = CEIL( M ). WRITE: / 'CEIL: ', N.
ENDIF.
Regards
‎2008 Mar 03 2:13 PM
There are arithematic operators available like CEIL, ABS.
Just do F1 on CEIL and you will find all related keywords.
Regards,
Atish
‎2008 Mar 03 2:16 PM
hi,
funny coments above, but FM ROUND is what you need...
hope this helps
ec