ESim v5.12 for EasyCoder PD4—Programmer’s Reference Manual 117
Chapter 7—Commands
V – Define Variable
Description is command is used to define variable data fields for use in
stored forms.
Syntax Vp
1
,p
2
,p
3
,"PROMPT"
Parameters p
1
Variable reference number (00-99).
A maximum total of 1500 bytes of data for all variables is allowed.
p
2
Maximum number of digits for the variable (1-99).
A maximum total of 1500 bytes of data for all variables is allowed.
p
3
Field justification:
L Left justification.
R Right justification.
C Center justification.
N No justification.
[-] A single leading minus sign in the prompt field will cause the prompt to be sent
one time only after the form is retrieved (Keyboard Display Unit only).
[- -] A double leading minus sign in the prompt field will cause the prompt to be
suppressed (Keyboard Display Unit only).
"PROMPT" An ASCII text field that will be transmitted to the host or Keyboard Display Unit
via the serial interface each time this command is executed. This prompt requests
the operator to enter the value for the variable.
Remarks is command is used in forms that require unique data on each
label. When initializing variables, they must be defined in order
(V00, V01, V02, etc.) immediately after the FS command.
e field justification parameter affects the way the variable will
be printed. When left, right, or center justification are selected,
the counter value will be printed left, right or center justified in
an area with a width defined by the p
2
parameter. If the number
of digits in the counter value is less than the number of digits
defined by p
2
, the area will be padded with space characters.
If no justification is selected, the field will adjust to fit the actual
length of the data and will not exceed the set maximum field
length, which may be useful when using a counter as input data
to a bar code.
To print the contents of a variable, the number of the variable
must be included in the "DATA" field of the A (Print Text) or B
(Print Bar Code) commands.