WAIT

From Recital Documentation Wiki
Revision as of 16:13, 26 October 2009 by Helengeorge (Talk | contribs)

Jump to: navigation, search


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 Mirage Server, Recital Terminal Developer