This action will format a floating-point number to a specified number of decimal places.
Action ID: 78
Action Category: Strings
The variable that will store the formatted number.
The number that will be formatted.
The number of decimal places that the number should be rounded or truncated to.
The method that should be used to format the number. Round will round the number up or down to the specified number of decimal places. A digit of five or greater gets rounded up while less than five gets rounded down. Truncate will simply cut the number off at a certain number of decimal places without rounding.
None.
The following command will round PI to four decimal places (3.1416):
Store result in variable: %RoundedPI%
Number to format: 3.1415926
Number of decimal places: 4
Method: Round
See Also: Alphabetical List of Actions, Categorical List of Actions, On Error tab