[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
+---------------------------------+
|               WAIT              |
+---------------------------------+
WAIT [<expC>] [TO <memvar>]
        [WINDOW [NOWAIT]]
        [TIMEOUT <expN>] [CLEAR]

-----------------------------------
Waits for keyboard input.
-----------------------------------

<expC>
        Specifies WAIT message.  If <expC> is not included, the default system
message, "Press any key to continue..." is displayed.  <expC> cannot be
a user-defined function.

TO <memvar>
        Saves value of any key.  If a carriage return or nonprintable character
is sent, the <memvar> is assigned the NULL character string.

WINDOW
        Displays WAIT message in system message window in upper right corner of
screen.

NOWAIT
        Creates WAIT WINDOW message that behaves like FoxPro system messages.
Like a system message, you may move the mouse or press any key to remove
the message.  A NOWAIT message doesn't discard the keystroke pressed to
remove the message from the screen (the keystroke is discarded if the
NOWAIT keyword isn't included).

TIMEOUT <expN>
        Specifies how many seconds WAIT is in effect.  The TIMEOUT option must
be the last clause in the WAIT command or a syntax error will result.

CLEAR
        Removes system window or WAIT <window> NOWAIT message from screen.

For example, if you issue SET TALK WINDOW, talk from indexing, sorting
and so on is directed to a system window in the upper right corner of
the screen.  The window is removed from the screen when you press a key
or move the mouse.  To remove the window from the screen in a program,
issue the command WAIT CLEAR.

Other WAIT options (WINDOW, NOWAIT, TIMEOUT ... ) cannot be used with
WAIT CLEAR.

+---------------------------------+
|         Program Example         |
+---------------------------------+
SET TALK OFF
CLEAR
USE customer
STORE .F. TO mexit
DEFINE WINDOW mskip FROM 9,30 TO 17,50 DOUBLE
DO WHILE NOT mexit
   ACTIVATE WINDOW mskip
   @ 1,5 PROMPT 'Forward  '
   @ 3,5 PROMPT 'Backward '
   @ 5,5 PROMPT 'Quit     '
   MENU TO mchoice
   DEACTIVATE WINDOW mskip
   DO CASE
     CASE mchoice = 1
         SKIP
         IF EOF()
            WAIT 'End of file encountered' WINDOW
            SKIP -1
         ENDIF
     CASE mchoice = 2
          SKIP - 1
         IF BOF()
            WAIT 'Beginning of file encountered' WINDOW
            GO TOP
         ENDIF
     CASE MCHOICE = 3
         STORE .T. TO mexit
         LOOP
   ENDCASE
   @ 20,10 SAY 'Company: ' + company
ENDDO

-----------------------------------

See Also:  ACCEPT, INPUT, SET TALK

-----------------------------------

See Also: ACCEPT INPUT SET TALK
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson