Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.2 . The Guide To CA-Clippe - <b>wait*</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 WAIT*
 Suspend program processing until a key is pressed
------------------------------------------------------------------------------
 Syntax

     WAIT [<expPrompt>] [TO <idVar>]

 Arguments

     <expPrompt> is an expression of any data type displayed as a prompt.
     If no <expPrompt> is specified, the default prompt displayed is:  "Press
     any key to continue..."

     TO <idVar> is the variable, of any storage class, that holds the
     value of the key pressed as a character value.  If <idVar> does not
     exist or is not visible, it is created as a private variable and then
     assigned the character value.

 Description

     WAIT is a console command and wait state that displays a prompt after
     sending a carriage return/linefeed to the screen.  It then waits for the
     user to press a key.  If the TO clause is specified, <idVar> is assigned
     the keystroke as a character value.  If an Alt or Ctrl key is pressed,
     WAIT assigns CHR(0) to <idVar>.  Nonalphanumeric values entered by
     pressing an Alt-keypad combination assign the specified character.  If
     the character can be displayed, it is echoed to the screen.  Function
     keys are ignored unless assigned with SET FUNCTION or SET KEY.

     WAIT is a compatibility command and therefore not recommended for
     general usage.  It is superseded by both @...GET/READ and INKEY() for
     getting single character input.

 Notes

     .  WAITing without a prompt: To pause execution without
        displaying a prompt, specify WAIT "" or INKEY(0).  The latter is
        recommended since it doesn't disturb the current screen cursor
        position.

 Examples

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

        aVar := ARRAY(6)

        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

 Files:  Library is CLIPPER.LIB.

See Also: @...GET ACCEPT INKEY() INPUT MENU TO

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson