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

Regarding variables...

Former Member
0 Likes
548

Hi

i have a variable a which stores the value 36.2

Now i want only the integer part to be printed.

ie: 36 should be printed.how it can be done.

Regards,

Varadharajan.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
517

v_val = trunc( v_amt ). "get you the integer part of v_amt

Regards,

Ravi

4 REPLIES 4
Read only

Manohar2u
Active Contributor
0 Likes
517

split a at '.' into b c.

write b.

Regds

manohar

Read only

Laxmana_Appana_
Active Contributor
0 Likes
517

Hi,

data : x_var1 type p decimals 1.

data : x_var2 type i.

x_var1 = '36.2'.

Move x_var1 to x_var2.

print--- x_var2.

Regards

Appana

Read only

Former Member
0 Likes
518

v_val = trunc( v_amt ). "get you the integer part of v_amt

Regards,

Ravi

Read only

Former Member
0 Likes
517

Hi Varadharajan,

data: x type i.

x = 36.2 .

write x.

Regards,

Kiran B