Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

rounded values

Former Member
0 Likes
399

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

3 REPLIES 3
Read only

Former Member
0 Likes
361

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

Read only

Former Member
0 Likes
361

There are arithematic operators available like CEIL, ABS.

Just do F1 on CEIL and you will find all related keywords.

Regards,

Atish

Read only

JozsefSzikszai
Active Contributor
0 Likes
361

hi,

funny coments above, but FM ROUND is what you need...

hope this helps

ec