HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
5-27
RESPONSE
The RESPONSE function returns information about the method and type of
input last entered from the keyboard. The statements listed below affect
the value that is returned by this function:
* INPUT
* LINPUT
* TINPUT
* ACCEPT
* PRESS KEY
* FLUSH INPUT
Likewise, the actions that are listed below affect the value that is
returned by the RESPONSE function:
* Pressing any branch-during-input key.
* Pressing the HALT key (control Y).
* Specifying a HARD HALT.
* Execution of the PRESS KEY statement.
NOTE Input using the ENTER and LENTER statements does not affect the
value returned by this function.
A FLUSH INPUT statement sets the value returned by RESPONSE to zero.
This function can be used in conjunction with the input statements and
softkeys to determine how the user has a responded to a program's input
statement. Table 5-7 lists the possible values returned by this function
with their corresponding meanings.
Table 5-7. RESPONSE Function Return Values and Their Meanings
---------------------------------------------------------------------------------------------
| | |
| Value | Meaning |
| | |
---------------------------------------------------------------------------------------------
| | |
| -1 through -8: | One of the user-definable keys , f1 through f8, was pressed. The |
| | value corresponds to the negative number of the actual key pressed. |
| | |
---------------------------------------------------------------------------------------------
| | |
| -255: | The HALT key was pressed. |
| | |
---------------------------------------------------------------------------------------------
| | |
| 0: | There has not been any input entered or a FLUSH INPUT statement |
| | preceded the function call. |
| | |
---------------------------------------------------------------------------------------------
| | |
| 1: | The HARD HALT key was pressed. |
| | |
---------------------------------------------------------------------------------------------
| | |
| 2: | A timeout has occurred. This occurs during the execution of a TINPUT |
| | or ACCEPT statement. |
| | |
---------------------------------------------------------------------------------------------
| | |