Mid - Monarch 9460 Programmer's Manual

Adk printer
Hide thumbs Also See for 9460:
Table of Contents

Advertisement

M I D
Purpose
Extracts a sub-field from a string.
Syntax

MID

Process
The MID command extracts a sub-field from
field2
Buffer-field1
Length
Rules:
Invalid
Optional Fields
chapter. The exception is as follows:
buffer-field2
If
control passes to that label.
Example 1
This example extracts a five-character substring starting at position 5 of LOCATION
and copies it into TEMP1.
MID LOCATION,TEMP1,#5,#5
Example 2
This example extracts a substring of LengthNum characters starting at position
StartNum of LOCATION and copies it into TEMP1.
MID LOCATION,TEMP1,StartNum,LengthNum
See Also
LEFT
LSTRIP
RIGHT
RSTRIP
5-60 Command Reference
buffer-field1
,
buffer-field2
; starting with the
,
buffer-field2
Buffer-field1, 2, Start
Length
INPUT
Logical Field Name
(TEMP1)
Logical Field Name (LU1)
Logical Field Name (PR1)
Logical Field Name
(Field1) [Index]
Buffer-field1
only:
String
Buffer-field1, start,
and
length
only:
Number
Start
and
must be numeric.
valid labels
and
overflows,
,
start
,
length
start
position and extracting
,
start
, and
length
and
Description
Input Buffer
Temporary Buffer
Field
Lookup Buffer Field
Printer Buffer Field
Array Buffer Field
ASCII string delimited
by double quotes
Number prefixed by a
number sign (#)
are discussed in "Script Flow" at the beginning of this
start
is greater than
[
,
[
invalid label
buffer-field1
and copies it into
length
number of characters.
can be one the following:
length
invalid label
, or
] [
, valid label
] ]
buffer-
is defined,

Advertisement

Table of Contents
loading

Table of Contents