Show/Hide Toolbars

XSharp

NoteThis 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

Purpose

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.  

Syntax

WAIT [<uValuePrompt>] [TO <idVar>]

Arguments

<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.  

Example

This example illustrates how to store the WAIT keystroke as an array element:

 

FUNCTION Start AS VOID
LOCAL aVar[2]
WAIT "Press a key..." TO aVar[1]
? aVar[1]           // Result:  key pressed in
                    // Response to WAIT
? aVar[2]           // Result:  NIL
? ValType(aVar)         // Result:  A
? ValType(aVar[1])     // Result:  C

Assembly

XSharp.RT.DLL

See Also

ACCEPT