How To Take Advantage of Rounding
Welcome to our Knowledge Base
Documentation | Blog | Demos | Support
< All Topics
Print
How To Take Advantage of Rounding
5 out of 5 stars
1 rating
5 Stars | 100% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |
The results of value expressions are rounded automatically, but only after the entire expression has been evaluated. (During evaluation, full decimal values are used.)
The final result takes on the number of decimal places found in the operand with the most decimal places.
The rounded result is further rounded if it is being assigned to a named constant, a variable, a field, or a form field defined to contain fewer decimal places.
To force rounding in particular circumstances, use the $round function.
Examples of Rounding
5/2
Result is 3.
5/2.0
Result is 2.5.
1+1.01
Result is 2.01.
1.01+(5/2)
Result is 3.51.
Integer=1.01+(5/2)
Result is 4 if Integer is defined to contain no decimal places.
Updated
ByJason Lee
Was this article helpful?
5 out of 5 stars
1 rating
5 Stars | 100% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |
5