114
34.2. Formatting variables
Users can format numeric, text and date variables intended for displaying
or printing out.
Different format commands:
•
Justification to the left,
•
Justification to the right,
•
Setting the number of characters for printout / display,
•
Declaration of the number of digital places for numeric variables,
•
Date&Time
formatting,
•
Formatting numeric variables for EAN13 codes,
•
Formatting numeric variables and dates for EAN128/GS1-128 codes.
Format characters:
Character Description
Example
,
Separates veriables from
format strings
{7,10} – Net mass in calibration unit situated
in 10-character string justified to the right.
-
Minus sign or justification to the
left
{7,-10} - Net mass in calibration unit situated
in 10-character string justified to the left
:
Precides formatting or
sepatates hours, minutes and
seconds
{7:0.000} - Net mass in calibration unit
always with three decimal places ;
{3:hh:mm:ss} – Present time in the format :
hours : minutes : seconds
.
The first dot in the format string
determines the location of the
decimal separator in the
formatted value; any additional
dot characters are ignored.
{55:0.00} – Unit price always with two
decimal places;
{17:0.0000} – Average value form weighings
with four decimal places;
F
The number is converted to a
string of the form "-ddd.ddd…"
where each 'd' indicates a digit
(0-9). The string starts with a
minus sign if the number is
negative.
{7:F2} - Net mass in calibration unit always
with two decimal places.
{7,9:F2} - Net mass in calibration unit always
with two decimal places in 9-character string
justified to the right.
V
Formatting mass and
derivatives for EAN13 codes
{7:V6.3} - Net mass for EAN13 (6-character
code) with three decimal characters
T
Formatowanie masy i wielko
ś
ci
pochodnych do masy w kodzie
EAN128
{7:T6.3} – Net mass for EAN128/GS1-128
with two decimal places.