VOPENTERM configures the driver and the terminal for block
mode access. VCLOSETERM configures the terminal and driver for character
mode access. These procedures initialize the terminal in many ways,
including clearing the screen image. VTURNON and VTURNOFF reconfigure the terminal and driver but leave
the terminal screen image intact. VTURNOFF allows the application to switch momentarily to
character mode from block mode without disturbing the screen. A
call to VTURNON will reconfigure the terminal back to block mode. An
example of such use is an application which performs graphics input/output
after the terminal has been opened by VOPENTERM and a form has been displayed using VSHOWFORMF. VTURNOFF can then be called to prepare for graphics operations.
A subsequent VTURNON call will switch the application back to VPLUS
block mode. The use of VOPENTERM, VCLOSETERM, VTURNON and VTURNOFF provides for a systematic approach to controlling
the terminal and driver settings.
The recommended practice for programming VPLUS applications
is to use only VPLUS procedures to perform terminal input/output
operations when in VPLUS. If the application must perform terminal
input/output operations using other input/output methods, either VCLOSETERM or VTURNOFF must be used to switch out of VPLUS before doing
so.
This simple programming guideline assures that the application
will be compatible with the different HP3000 drivers and terminals,
and improves its maintainability.
VTURNOFF |
 |
Turns off VPLUS block mode and enables character mode access
without disturbing the terminal screen.
- comarea
Must be comarea named when the file was opened by VOPENTERM. If not already set, the following comarea items must be set before calling VTURNOFF.
- cstatus
Set to zero.
- comarealen
Set to total number of 2-byte words of comarea.
VTURNOFF may set the following comarea items:
- cstatus
Set to nonzero value if call is unsuccessful.
- fileerrnum
Set to file error code if there is an MPE file error.
VTURNOFF is used for momentarily switching from VPLUS block
mode to character mode. This procedure is designed for use after
a terminal has been previously opened by VOPENTERM or after a VTURNON.
VTURNOFF reconfigures the terminal and driver for character
mode operations without disturbing the screen image on the terminal.
The following operations normally performed in VCLOSETERM are not performed in VTURNOFF:
Enable the USER/SYSTEM keys
Disable touch reporting, delete touch fields
VTURNOFF |
 |
 |
 |  |
 |
 | NOTE: VTURNOFF does not close the terminal file. To close the field and
completely reset the driver and the terminal, VCLOSETERM must be used. |
 |
 |  |
 |
The following examples illustrate a call to VTURNOFF: COBOL CALL "VTURNOFF" USING COMAREA. BASIC 200 CALL VTURNOFF (C(*)) FORTRAN CALL VTURNOFF (COMAREA) SPL VTURNOFF (COMAREA); PASCAL VTURNOFF (COMAREA);
|
VTURNON |
 |
Turns on VPLUS block mode without disturbing the terminal
screen.
VTURNON {comarea,TERMFILE}
|
- comarea
The comarea name must be unique for each open forms file. The comarea must be the same one used in VOPENTERM. The following comarea items must be set before the call if not already
set:
- cstatus
Set to zero.
- language
Set too code that identifies the programming language
of the calling program.
- comarealen
Set to total number of 2-byte words in comarea.
VTURNON may set the following comarea fields.
- cstatus
Set to nonzero value if call is unsuccessful.
- fileerrnum
Set to file error code if there is an MPE file error.
- filen
Set to MPE file number of terminal.
- identifier
Set to appropriate VPLUS terminal ID.
- lab'info
Set to appropriate number and length of labels.
VTURNON is normally used in an application when the terminal
has already been opened by VOPENTERM and VTURNOFF was called to switch out of VPLUS block mode. VTURNON switches the application back to VPLUS block mode
without disturbing the image on the terminal screen.
After a VTURNON, you must perform a VSHOWFORM. You must also unlock your keyboard. Sending the escape
sequence ESC-b unlocks the keyboard programmatically, or depressing the RESET key once also unlocks the keyboard.
VTURNON reconfigures the terminal and the driver without
performing the following operations, which are usually carried out
by VOPENTERM.
Initialize local form storage
Enable the USERKEYS function keys
Disable or enable the USER/SYSTEM key as specified
in the SHOWCONTROL word
Unlike VOPENTERM, VTURNON will not ask you to press the BLOCK MODE key if you are using an HP2640B or HP2644 terminal
and the terminal is not on block mode.
The following examples illustrate a call to VTURNON: