Previous Next

PAUSE statement
Suspends processing indefinitely, or for a specified number of seconds, or until the user presses any key.
Note:
Syntax 
 
PAUSE
  [ n ]
  [ BEFORE-HIDE ]
  [ MESSAGE message | NO-MESSAGE ] 
  [ IN WINDOW window ]
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.
 
PAUSE 2 BEFORE-HIDE MESSAGE "Pausing 2 seconds".
 
FOR EACH Customer NO-LOCK WITH 13 DOWN:
  DISPLAY Customer.CustNum Customer.Name.
END.
Notes 
*
*
Using the PAUSE n BEFORE-HIDE statement is a good way to write a demonstration application that runs by itself.
*
*

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.