We disagree here:
'Expected Actual
system.DebugLog(format(0, "0,###")) '0,000 00 <<<<
system.DebugLog(format(0, "0###")) '0000 00 <<<<
'Case 44624
system.DebugLog(format(0, "00.#")) '00 00. <<<<
system.DebugLog(format(0.0, "#.##")) '<empty> 0. <<<<
system.DebugLog(format(0, "#")) '<empty> 0 <<<<
system.DebugLog(format(0, "0")) '0 0
What I do expect:
system.DebugLog(format(0, "0,###")) 'Exception Error, Invalid mask 00 <<<<
system.DebugLog(format(0, "0###")) 'Exception Error, Invalid mask 00 <<<<
'Case 44624
system.DebugLog(format(0, "00.#")) '00. 00. <<<<
system.DebugLog(format(0.0, "#.##")) '<empty> <empty> <<<<
system.DebugLog(format(0, "#")) '<empty> <empty> <<<<
system.DebugLog(format(0, "0")) '0 0
The “0” mask should be only used as a sequence before and after the decimal point without intervening “#” (remove if 0) in the middle. Then “#” can be after the zeros, on the right side, after the decimal point, or after the zeros, to the left side, after the decimal point. So:
Valid:
####0
###0.
###0.###
###0.00
###0.00##
Invalid:
0###
0###0
0.0##0
etc.