‎2010 Jun 07 4:08 PM
Hi,
I want result 3/2 = 1.5. Please which data types to be used because i tried with type P decimals 2 but result is 1.00. I have defined three data objects and their type is P decimals 2 and using value to hard code constant ie 2 & 3. when i use operator div and divide 3 by 2 i am geting value 1.00. Please gudie
Thanks
Moderator message: please use more descriptive subject lines from now on.
Edited by: Thomas Zloch on Jun 7, 2010 5:10 PM
‎2010 Jun 07 4:13 PM
You do know that the DIV operator is for integer calculations only? You can find the correct operator yourself.
Thomas
‎2010 Jun 07 4:13 PM
You do know that the DIV operator is for integer calculations only? You can find the correct operator yourself.
Thomas
‎2010 Jun 08 7:11 AM
check this code
data num type p DECIMALS 2 value '3.00'.
data den type i value 2.
data res type p decimals 2.
res = num / den.
write res.
Thanks
Bala Duvvuri