×
Menu
Index

GETKEY Subroutine

 
Usage:
n = GETKEY([prompt[, timeout]])
 
Description:
The GETKEY subroutine returns the value of the next key pressed by the user. prompt is an optional prompt string that is displayed before waiting for the key press.
 
Timeout is an optional argument that specifies a timeout period, in seconds. If the user does not press any key within the specified number of seconds, the GETKEY subroutine returns a value of 0 without waiting for a keystroke. If the timeout argument is omitted or is 0, the GETKEY subroutine waits for the next keystroke regardless of how long it takes. Note that the timeout argument can be specified only if the prompt argument is specified; however, prompt may be an empty string ("").