 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
DLUTER
Joined: 16 Mar 2007 Posts: 44 Country: United States |
|
Round function not giving correct number. |
|
Version 3.4.31
When I use the round function it actuall divides the number, not rounds it to the desired decimal place. Is this a known issue or am I doing it wrong?
dim Rnum, number
dim Dnum, number
Round( 188.51483104191720485687255859375, 3, Rnum )
Divide( 188.51483104191720485687255859375, 3, Dnum )
Rnum = 63
Dnum = 62.8382770139724
Also, when I use "0" on the round function it gives me a "Division by Zero" error.
|
|
Mon May 19, 2008 12:59 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Must be some bug in JAL interpreter. I submited this issue for fixing.
As a workaround, please use the Format function
dim Rnum, number
Format( 188.51483104191720485687255859375, "#.000", Rnum )
|
|
Mon May 19, 2008 3:26 pm |
|
 |
DLUTER
Joined: 16 Mar 2007 Posts: 44 Country: United States |
|
|
|
That worked, thanks for the workaround.
|
|
Tue May 20, 2008 11:41 am |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|