Modify

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

Attachments (0)

Change History (1)

comment:1 by Valik, 16 years ago

Resolution: Rejected
Status: newclosed

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

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.