Formatting character definitions and examples, Character formatting definitions and examples, Number formatting definitions and examples – Wasp Barcode WaspLabeler +2D User Manual User Manual

Page 131: Numbers

Advertising
background image

127

Wasp Labeler User Manual

Formatting Character Definitions and Examples

The tables below contain the formatting characters, their meanings and additional information about
each one. You will combine these characters to create your format expression.

Number Formatting

Character Definition

Additional Information

Examples

0

Digit

Placeholder

Display a digit or a zero. If there is a digit in the position
where the 0 appears in the format string, display it;
otherwise display a zero in that position.

If the number being formatted has fewer digits than there
are zeros (on either side of the decimal) in the format
expression, leading or trailing zeros are displayed. If the
number has more digits to the right of the decimal
separator than there are zeros to the right of the decimal
separator in the format expression, the number is rounded
to as many decimal places as there are zeros. If the
number has more digits to the left of the decimal separator
than there are zeros to the left of the decimal separator in
the format expression, the extra digits are displayed
without modification.

1234.5678
("00000") =
012345

0.45678 ("0,00") =
0.46

#

Digit

Placeholder

Display a digit or nothing. If there is a digit in the position
where the # appears in the format string, display it;
otherwise, display nothing in that position.
This symbol works like the 0 digit placeholder, except that
leading and trailing zeros aren't displayed if the number
has the same or fewer digits than there are # characters on
either side of the decimal separator in the format
expression.

1234.5678
("#####") = 12345

0.45678 (#.##") =
.46

.

Decimal

Placeholder

The decimal placeholder determines how many digits are
displayed to the left and right of the decimal separator. If
the format expression contains only numbers sign to the
left of this symbol, numbers smaller than 1 begin with a
decimal separator. If you want a leading zero to always be
displayed with fractional numbers, use 0 as the first digit
placeholder to the left of the decimal separator instead.

0.45678 ("0.00") =
0.46

%

Percentage

Placeholder

The expression is multiplied by 100. The percent character
(%) is inserted in the position where it appears in the
format string.

0.3697 ("%#0.00")
= %36.97

0.3697 ("##.0%")
= 37.0%

,

Thousand

Separator

The thousand separator separates thousands from
hundreds within a number that has four or more places to
the left of the decimal separator. Surround the thousand
separator with the digit placeholders (0 or #). Two adjacent
commas or a comma immediately to the left of the decimal
separator (whether or not a decimal is specified) means
"scale the number by dividing it by 1000, rounding as
needed." You can scale large numbers using this

2147483647
("#,#,,") = 2,147

Advertising