GoFiler Legato Script Reference
Legato v 1.5b Application v 5.24b
|
Table of Contents | < < Previous | Next >> |
Chapter Seven — Math Functions (continued)
Overview
The Round function rounds a source value at an optional place using an optional rounding method.
Syntax/Parameters
Syntax
float = Round ( float x, [int place], [int mode] );
Parameters
x
A float as the source value to round.
place
An optional int specifying the position to round from. The default is 0, or whole numbers. Set the place to -2 for cents, or 3 for thousands.
mode
An optional int specifying the mode in which to round x. The default value is ROUND_NEAREST.
Return Value
Returns a float containing rounded number or 0.0 on failure. Use the IsError or GetLastError functions to determine if an error occurred.
Remarks
The Round function allows numbers to be rounded up or down based on the digits prior to the place parameter. The method is set by the mode and can be any of the following:
Definition | Ordinal | Description | ||||
ROUND_NEAREST | 0 | Round Towards the Nearest | ||||
ROUND_UPWARD | 1 | Round towards Positive Infinity | ||||
ROUND_DOWNWARD | 2 | Round Towards Negative Infinity | ||||
ROUND_TOWARD_ZERO | 3 | Round Toward Zero |
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Page revised 2024-10-21
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.