43.2. Variables Formatting
You can format numeric variables, text variables and dates which are to be printed or displayed in the
grey workspace.
Formatting types:
•
variables with left justification,
•
variables with right justification,
•
determining quantity of characters for printing / displaying,
•
determining quantity of decimal places for numerical variables,
•
converting the format of date and hour,
•
converting numerical variables into EAN13 code
•
converting numerical variables and date into EAN128 code
Special formatting characters:
Character
Description
,
Sign separating variable from
format item
-
Either
justification.
:
Either sign proceeding format
item or time separator (i.e. hours,
minutes and seconds).
.
The first dot is recognized as
separator of integer digit from
decimal fraction digit. All but first
dots are ignored.
F
Either sign formatting digits to a
string
(where: d - single digit, minus - for
negative
determination of decimal places
quantity.
V
Formatting mass and quantities
being derivatives of mass in
EAN13 code.
T
Formatting mass and quantities
being derivatives of mass in
EAN128 code.
/
Date separator separating days,
months and years.
\
Sign
formatting
following
recognized as text
minus
sign
or
of
"-ddd.ddd..."
format
value
only)
"escape"
deleting
function
from
sign,
so that
Example
{7,10} - Net weight value of fixed length (10
characters), given in an adjustment unit, right
justification.
left
{7,-10} - Net weight value of fixed length (10
characters), given in an adjustment unit, left
justification.
{7:0.000} - Net weight value given in an
adjustment unit, always with three decimal places;
{3:hh:mm:ss} – Current time in format: hour :
minute : second.
{55:0.00} - Product's unit price always with two
decimal places;
{17:0.0000} – Measurements average, always
with four decimal places;
{7:F2} - Net weight value given in an adjustment
unit, always with two decimal places.
{7,9:F2} - Net weight value of fixed length (9
or
characters), given in an adjustment unit, always
with two decimal places, right justification.
{7:V6.3} - Net mass in a form of EAN13 code (6-
character code) with three decimal places.
{7:T6.3} - Net mass in a form of EAN128 code
with three decimal places.
{2:yy/MM/dd}
year - month - day, where yy stand for two less
meaningful characters of a year;
a
{2:yy\/MM\/dd} – Current date in format: year /
the
month / day. {2:yy\:MM\:dd} - Current date in
it
is
format: year : month : day. Should „\" be used as
a literal, insert \\.
- 211 -
-
Current
date
in
format: