mr_suleyman
18th October 2004, 10:25
Hi all ,
I have a problem with round . I want to find percentage of a operation.
I used a varible to calculate it. its round type is round-off. But when I run session , it round its value. If the value of calculation is 7.6 , it is 8 . if the value is 7.4 , it is 7. you know that the value is very important in pertanges calculation. Why it rounds the value ? I couldn't understand ıt.
-----------------------------
Propertie of my variable :
package : ti
domain : sfc.olap
data type :float
numaric data -- before sign :3
after sign : 2
divide factor :1
rounding method : round off
-----------------------------------
do you have any suggestion for it ?
Thanks all in advice

bdittmar
18th October 2004, 10:51
Hello mr_suleyman,

as descriped in BaaN development toolsbook, the result of round is of type double.
If no round mode is specified, default mode 1 is taken.
So that 1.5 -> 2 and 1.49 -> 1.

format of round:

round(value, long diga, long mode)

Example:

round(1.345,2,1) gives 1.350000

Regards Bernd

mr_suleyman
18th October 2004, 11:15
Excuse me , I don't want to its rounding . What is problem ? its type is round-off but it rounds my calculation.

mark_h
18th October 2004, 14:51
Post the code and someone might see something that is causing the rounding problem.

Mark

mr_suleyman
18th October 2004, 16:33
Thank you mark , I reliaze that there was a variable that its type was round in my calculation. I solved it.