5-40 Command Reference
FETCH
Purpose Retrieves one character from up to two sources and places it in the Input Buffer.
Syntax FETCH
src1
[
,
src2
] [ , [
invalid label
] [
, valid label
] ]
Process The FETCH command retrieves one character from
src1
and optionally,
src2
. It
places these characters in the Input Buffer.
NOTE: The DATATYPE and CHARTYPE commands do not affect this command.
Src1
and
src2
can be one of the following:
Src1
and
Src2
Description
COMM Communications port
KEYBOARD Keypad
Characters retrieved from the keyboard will be either 1, 2, or 3, depending on
which hot key was pressed.
Optional Fields Invalid and valid labels are discussed in “Script Flow" at the beginning of this
chapter.
Example
This example retrieves one character from the communications port and passes
control to the next line.
FETCH COMM
See Also GET