Modify decimal masking to optionally suppress trailing decimal places with zero values.
Modify decimal masking so that it is possible to suppress the trailing zeroes of decimal place values.
For example:
123.80000,'ZZZ.XXZZZ' would display 123.80
123,80010,'ZZZ.XXZZZ' would display 123.8001
123,80010,'ZZZ.XXXXX'. would display 123.80010
123.00000,'ZZZ.ZZZZZ'; would display 123
Note that unless [left] or [right] were specified, the resulting text would
be aligned on the decimal place in the mask.
123.80
123.8001
123.80010
123
It also handles negatives and other mask values like $.
Geoff
5/28/2021 7:02 AM 0
Thank you for the offer, but I have also written a function to handle this. But it would just be better if it were embedded into the language -- including the Toolkit.
5/28/2021 11:22 AM 0
6/22/2021 4:41 PM 0
I'd love some options here, too. I agree with Steve that it wouldn't be good to just change the existing methods, but I'd love if there were a way to optionally define different formats. I'd think that introducing a new masking character would create problems for those who mask numbers into the middle of strings (e.g. ALPHA = DECIMAL, "Please pay $$$$$$.XX"), but I'd think new bracketed justifications could handle it, like [DEC] or [LEFT-DEC].
6/25/2021 8:52 PM 0