Difference between revisions of "WAIT"
Yvonnemilne (Talk | contribs) |
Helengeorge (Talk | contribs) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
Suspend program execution until a key is pressed at the keyboard | Suspend program execution until a key is pressed at the keyboard | ||
Line 12: | Line 5: | ||
==Syntax== | ==Syntax== | ||
WAIT [<expC>] | WAIT [<expC>] | ||
+ | |||
[CLEAR] | [CLEAR] | ||
+ | |||
[NOWAIT] | [NOWAIT] | ||
+ | |||
[TO <memvar>] | [TO <memvar>] | ||
+ | |||
[TIMEOUT <expN>] | [TIMEOUT <expN>] | ||
+ | |||
[WINDOW] | [WINDOW] | ||
Line 26: | Line 24: | ||
The WAIT command displays the specified prompt <expC> on the screen and suspends program execution until a key is pressed. If no <expC> is specified, then "Press any key to continue..." is displayed. The key that is read from the keyboard is not echoed. | The WAIT command displays the specified prompt <expC> on the screen and suspends program execution until a key is pressed. If no <expC> is specified, then "Press any key to continue..." is displayed. The key that is read from the keyboard is not echoed. | ||
− | CLEAR | + | ====CLEAR==== |
The CLEAR keyword will remove a system window or window message when the WAIT command is called from a program. | The CLEAR keyword will remove a system window or window message when the WAIT command is called from a program. | ||
− | NOWAIT | + | ====NOWAIT==== |
The NOWAIT keyword will create a message like the Recital/4GL system message, which is displayed in the upper right hand corner. A message created with the NOWAIT keyword does not discard the keystroke you use to remove the message. | The NOWAIT keyword will create a message like the Recital/4GL system message, which is displayed in the upper right hand corner. A message created with the NOWAIT keyword does not discard the keystroke you use to remove the message. | ||
− | TIMEOUT <expN> | + | ====TIMEOUT <expN>==== |
The TIMEOUT clause lets you specify the number of seconds, <expN>, the message will remain on the screen before the program execution continues. This is provided for Xbase language compatibility only. | The TIMEOUT clause lets you specify the number of seconds, <expN>, the message will remain on the screen before the program execution continues. This is provided for Xbase language compatibility only. | ||
− | TO <memvar> | + | ====TO <memvar>==== |
If the optional TO <memvar> clause is specified, then the key that is pressed is stored as a character string in the designated memory variable. If the [RETURN] key is pressed, or the key which is pressed does not represent a printable character, then a null string, "", is stored in the memory variable. If the memory variable does not exist, it is created. | If the optional TO <memvar> clause is specified, then the key that is pressed is stored as a character string in the designated memory variable. If the [RETURN] key is pressed, or the key which is pressed does not represent a printable character, then a null string, "", is stored in the memory variable. If the memory variable does not exist, it is created. | ||
− | WINDOW | + | ====WINDOW==== |
The WINDOW keyword will cause the message to be displayed in the system message window. | The WINDOW keyword will cause the message to be displayed in the system message window. | ||
Line 50: | Line 48: | ||
==Products== | ==Products== | ||
− | Recital | + | Recital |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] |
Latest revision as of 16:30, 25 November 2009
Contents
Purpose
Suspend program execution until a key is pressed at the keyboard
Syntax
WAIT [<expC>]
[CLEAR]
[NOWAIT]
[TO <memvar>]
[TIMEOUT <expN>]
[WINDOW]
See Also
ACCEPT, @...GET, DIALOG BOX, INPUT, MESSAGE, READ
Description
The WAIT command displays the specified prompt <expC> on the screen and suspends program execution until a key is pressed. If no <expC> is specified, then "Press any key to continue..." is displayed. The key that is read from the keyboard is not echoed.
CLEAR
The CLEAR keyword will remove a system window or window message when the WAIT command is called from a program.
NOWAIT
The NOWAIT keyword will create a message like the Recital/4GL system message, which is displayed in the upper right hand corner. A message created with the NOWAIT keyword does not discard the keystroke you use to remove the message.
TIMEOUT <expN>
The TIMEOUT clause lets you specify the number of seconds, <expN>, the message will remain on the screen before the program execution continues. This is provided for Xbase language compatibility only.
TO <memvar>
If the optional TO <memvar> clause is specified, then the key that is pressed is stored as a character string in the designated memory variable. If the [RETURN] key is pressed, or the key which is pressed does not represent a printable character, then a null string, "", is stored in the memory variable. If the memory variable does not exist, it is created.
WINDOW
The WINDOW keyword will cause the message to be displayed in the system message window.
Example
@23,0 wait "Enter your selection..." to option
Products
Recital