PAUSE statement
- Last Updated: January 16, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
Suspends processing indefinitely, or for a specified number of seconds, or until the user presses any key.
Note: Does not apply to SpeedScript programming.
Syntax
|
- n
- A numeric expression specifying the number of seconds that you want
to suspend processing. You can choose a whole or a fractional value for
the time-out interval. If the time-out period you specify is a fractional value,
the value is rounded to the nearest whole millisecond.
If you do not use this option, the AVM suspends processing until the user presses any key.
- BEFORE-HIDE
- Specifies the pause action the user must take whenever frames are hidden automatically. If you specify n, n is the number of seconds the AVM pauses before hiding. If you do not specify n, the pause lasts until the user presses a key.
- MESSAGE message
- Displays the message "Press spacebar to continue" on the status line of the terminal screen when the AVM encounters a PAUSE statement. Use the MESSAGE option to override that default message. A message is a constant character string.
- NO-MESSAGE
- Tells the AVM to pause but not to display a message on the status line of the terminal screen.
- IN WINDOW window
- Specifies the window to which the pause action applies. The value window must be a handle to a window. If you do not use the IN WINDOW phrase, the PAUSE statement applies to the current window.
Example
The FOR EACH block in this procedure reads each of the records from the Customer table and displays information from each record. Because the DISPLAY uses a down frame (multiple records displayed in the frame), the AVM usually fills the window with as many records as possible and then displays the message: "Press spacebar to continue". The PAUSE 2 BEFORE-HIDE message tells the AVM to pause only two seconds before hiding the frame and displaying additional records.
r-pause.p
|
Notes
- After you use PAUSE, that statement is in effect for all the procedures run in that session unless it is overridden by other PAUSE statements in those procedures, or until you return to the Editor.
- Using the PAUSE n BEFORE-HIDE statement is a good way to write a demonstration application that runs by itself.
- The AVM automatically pauses before removing a frame and displays the "Press spacebar to continue" message if you have not had a chance to see the data in the frame.
- When a PAUSE occurs, the AVM clears any keystrokes buffered from the keyboard, discarding any type-ahead characters.