Suppress leading zero

You can use the format function to blank (Z) or pad (*) leading zeros in the result.

To suppress leading zeros, the mask must contain a padding symbol in the first numerical position and any applicable subsequent positions. Any of these positions in the mask that would be filled with a leading zero are filled with the padding symbol instead.

If input is 0 and the mask contains only blank (Z) symbols, the result is a series of spaces with the length of the mask.

If input is 0 and the mask contains only asterisk (*) symbols, the result is a series of asterisks with the length of the mask. If the mask contains a decimal point, the decimal point is included in the result.

Examples

format (123.456; "Z,ZZZ.ZZ+") results in "øø123.46+"

format (-123.45; "*,***.**+") results in "**123.45-"

format (12345678.9; "**,***,***.**") results in "12,345,678.90"

format (12345.67; "$Z,ZZZ,ZZZ.ZZCR") results in "£øøø12,345.67øø"

format (-12345.67; "$B*,***,***.**BBDB") results in "£ø***12,345.67øøDB"

format (0; "*,***.**") results in "*****.**"

format (0; "Z,ZZZ.ZZ") results in "øøøøøøøø"

format (0; "ZZZZ.99") results in "øøøø.00"

format (0; "*,***.99") results in "*****.00"

format (0; "ZZ99.99") results in "øø00.00"