‎2007 Oct 19 7:48 PM
DATA : A(2) TYPE N,
B TYPE N.
A = 11.
IF A GE 10.
B = A / 10.
ENDIF.
WRITE : / B.
b = 1
if a = 19
b = 2.
I want here b = 1
when a = 20 or greater than 20
thats when b = 2
let me know how to do this.
Thanks
‎2007 Oct 19 7:51 PM
‎2007 Oct 19 7:51 PM
Hi
Use ROUND or FLOOR or CEIL or some other maths functions here
you will get it
see this
abs -Absolute value of the argument arg
sign- Plus/minus sign of the argument arg: -1, if the value of arg is negative; 0 if the value of arg is 0; 1 if the value of arg is positive.
ceil -Smallest integer number that is not smaller than the value of the argument arg.
floor- Largest integer number that is not larger than the value of the argument arg.
trunc- Value of the integer part of the argument arg
frac- Value of the decimal places of the argument arg
Regards
Anji
‎2007 Oct 19 7:51 PM
‎2007 Oct 19 7:56 PM