Home » Community » U++ community news and announcements » New options in double formatting
New options in double formatting [message #34318] |
Fri, 11 November 2011 15:10 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
I have found it is quite difficult to force EditDouble to use ',' instead of '.' for decimal point, that lead to a chain of minor improvements...
First of all, Format now recognized ',' and '@' n/ne/nf/nl/v/ve/vf/vl formatting, first one forces decimal point to be displayed as ',', second one supresses thousands separators in i18n formatting (that is not exactly solving the original problem, but might be quite necessary sometimes too_:
Format("%n", 1234567.89) = 1234567.89
Format("%,n", 1234567.89) = 1234567,89
Format("%nl", 1234567.89) = 1,234,567.89
Format("%@nl", 1234567.89) = 1234567.89
Format("%@,nl", 1234567.89) = 1234567,89
Next, ConvertDouble::Pattern now performs "scan for decimal point" - it does Format(1.1) and then scans for ',' in result - if it detects one, it then forces Filter to force ',' as decimal point.
After these changes, forcing EditDouble to use ',' is just matter of calling Pattern("%,n")...
|
|
|
|
|
Goto Forum:
Current Time: Sun Apr 28 21:12:53 CEST 2024
Total time taken to generate the page: 0.06740 seconds
|