|Note||This command is defined in a header file and will be preprocessed by the X# preprocessor to a function call. If you disable the standard header (-nostddefs) files then this command will not be available. If you tell the compiler to use a different standard header file (-stddef ) then this command may also be not available|
Display a prompt after sending a carriage return/linefeed to the terminal window, then wait for a key to be pressed.
Note: WAIT is a compatibility command and is no longer recommended.
WAIT [<uValuePrompt>] [TO <idVar>]
|<uValuePrompt>||An optional prompt displayed before the input area. If omitted, "Press any key to continue..." is displayed. Specify NULL_STRING if you do not want to display a prompt.|
|TO <idVar>||The variable that will hold input from the keyboard. If there is no variable named <idVar> that is visible to the current routine, a private variable is created. <idVar> is assigned the keystroke as a string. If an Alt or Ctrl key combination is pressed, WAIT assigns Chr(0) to <idVar>.|
|Non-alphanumeric values entered by pressing an Alt+key combination assign the specified character. If the character can be displayed, it is echoed to the screen.|
This example illustrates how to store the WAIT keystroke as an array element:
FUNCTION Start AS VOID
WAIT "Press a key..." TO aVar
? aVar // Result: key pressed in
// Response to WAIT
? aVar // Result: NIL
? ValType(aVar) // Result: A
? ValType(aVar) // Result: C