Monarch 9460 Printer User Manual


 
Command Reference 5-73
RIGHT
Purpose Extracts the right-most characters from a string.
Syntax RIGHT
buffer-field1
,
buffer-field2
,
length
[
,
[
invalid label
]
[
, valid label
] ]
Process The RIGHT command extracts the right-most characters from
buffer-field1
,
specified by
length
, and copies them into
buffer-field2
.
The
buffer-field
fields can be one of the following:
Buffer-field1, 2
and
length
Description
INPUT Input Buffer
Logical Field Name
(TEMP1)
Temporary Buffer
Field
Logical Field Name (LU1) Lookup Buffer Field
Logical Field Name (PR1) Printer Buffer Field
Buffer-field1
only:
String
ASCII string delimited
by double quotes.
Must be one
character long
Buffer-field1
and
length
only:
Number
Number prefixed by a
number sign (#)
Rule:
Length
must be numeric.
Optional Fields
Invalid
and
valid labels
are discussed in "Script Flow" at the beginning of this
chapter.
Example 1
This example extracts the five right-most characters from SHIP_NO and copies
them to SKU.
RIGHT SHIP_NO,SKU,#5
Example 2
This example extracts the NUMCHARS right-most characters from SHIP_NO and
copies them to SKU.
RIGHT SHIP_NO,SKU,NUMCHARS
See Also
LEFT
LSTRIP
MID
RSTRIP