Opened 16 years ago
Closed 16 years ago
#1741 closed Feature Request (Rejected)
Rounding: optionally add trailing zeros
| Reported by: | Dana | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | Severity: | None | |
| Keywords: | round trailing zero decimal | Cc: |
Description
Currently, the Round function does not pad trailing zeros onto a number that has less than the specified number. In most cases this is good; however, there are circumstances (for example, formatting columns of numbers for printing) where having all the strings of the same length is necessary. I would like to see an optional additional boolean parameter to specify that trailing zeros be added to bring it up to the specified number of digits (the default, of course, is don't add trailing zeros). Alternately, a negative number for decimal places could mean to add trailing zeros. Neither of these changes would break existing programs.
Round("1.234", 4, 0) or Round("1.234", 4) >> 1.234
Round("1.234", 4, 1) or Round("1.234", -4) >> 1.2340

You're asking a function that returns numbers to do String Formating...