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 F data Type

Former Member
0 Likes
566

Hi Expart ,

I am using a variable of type F (v_min). I don't want the decimals or Exponent .say Example v_min = 4.85.

i only need to display 4 not the decimals .if i use exponent 0 and decimals 0 then it become '5' .but i dont want 5 i need 4 .same thing happenning if i used i or p data type .

Please help me to get the correct value .

Thanks in advance

Raju

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
538

Thanks Vikranth.Reddy .By your ans i have solved the problem i give you 10

4 REPLIES 4
Read only

Former Member
0 Likes
538

Hi,

Declare the variable as type F and use TRUNC function

Eg,



data: var type F value '4.85',
          result type I.

result = TRUNC( var ).

write: result. 

Read only

Former Member
0 Likes
538

Hi,

You can also use 'floor' function.

Read only

Former Member
0 Likes
539

Thanks Vikranth.Reddy .By your ans i have solved the problem i give you 10

Read only

0 Likes
538

Hey tarak seems you have given only 6. Hope its a correction to be rectified.