HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)

344 Chapter6
USING VPLUS INTRINSICS
INTRINSIC DESCRIPTIONS
VREADFIELDS
Accepts all user input from an open terminal, including data entered by pressing ENTER,
or user requests made by pressing a function key. Allows look-ahead form loading.
Syntax
VREADFIELDS {
comarea
}
Parameters
comarea
Must be
comarea
named specified when terminal file was opened with
VOPENTERM. If not already set, the following
comarea
items must be set
before calling VREADFIELDS:
cstatus
Set to zero.
comarealen
Set to total number of two-byte words in
comarea
.
The following
comarea
items can be set:
lookahead
Set to zero to enable look-ahead form loading or to one to
disable look-ahead form loading.
showcontrol
Set to control the touch feature or to affect the display on
data capture devices. The particular settings are described
below.
VREADFIELDS may set the following
comarea
values:
numerrs
Set to zero.
lastkey
Set to code for terminal function key pressed by user.
cstatus
Set to nonzero value if call unsuccessful.
Discussion
VREADFIELDS accepts user-entered data when ENTER is pressed. It maps the data into the
data buffer in memory. The data is mapped in screen order, from left to right, top to
bottom. If there are any display-only fields already in the buffer, the fields read by
VREADFIELDS are interspersed among the display-only fields according to the screen order.
VREADFIELDS then sets
lastkey
to zero. Note that the keyboard is locked after the data is
read (the subsequent call to VSHOWFORM unlocks the keyboard). If a function key is pressed,
VREADFIELDS sets
lastkey
to the corresponding number: 1 for f1, 2 for f2, and so forth.
The screen is
not
read and data is not transferred when a function key is pressed. It is,
however, possible to accomplish this by enabling the AUTOREAD feature. To enable
AUTOREAD, a bit must be set in the
termoptions
position of the
comarea
. For further
information regarding the AUTOREAD feature, consult the Terminal Communications Area
section of Appendix G.
Application programs must supply the code to perform each of the functions that can be
requested via a function key. The particular function assigned to a key is determined only
by how the program processes the key code passed to it by VREADFIELDS (refer to Appendix
A for examples of applications using VREADFIELDS).
Normally, there is no time limit for VREADFIELDS, whether the intrinsic is to be terminated