Pause

The pause command displays any text associated with the command and then waits a specified amount of time or until the carriage return is pressed. pause is especially useful in conjunction with load files.

Syntax:

     pause <time> {"<string>"}
     pause mouse {<endcondition>}{, <endcondition>} {"<string>"}
     pause mouse close

4#4time5#5 may be any constant or floating-point expression. pause -1 will wait until a carriage return is hit, zero (0) won't pause at all, and a positive number will wait the specified number of seconds.

If the current terminal supports mousing, then pause mouse will terminate on either a mouse click or on ctrl-C. For all other terminals, or if mousing is not active, pause mouse is equivalent to pause -1.

If one or more end conditions are given after pause mouse, then any one of the conditions will terminate the pause. The possible end conditions are keypress, button1, button2, button3, close, and any. If the pause terminates on a keypress, then the ascii value of the key pressed is returned in MOUSE_KEY. The character itself is returned as a one character string in MOUSE_CHAR. Hotkeys (bind command) are disabled if keypress is one of the end conditions. Zooming is disabled if button3 is one of the end conditions.

In all cases the coordinates of the mouse are returned in variables MOUSE_X, MOUSE_Y, MOUSE_X2, MOUSE_Y2. See mouse variables (p. [*]).

Note: Since pause communicates with the operating system rather than the graphics, it may behave differently with different device drivers (depending upon how text and graphics are mixed).

Examples:

     pause -1    # Wait until a carriage return is hit
     pause 3     # Wait three seconds
     pause -1  "Hit return to continue"
     pause 10  "Isn't this pretty?  It's a cubic spline."
     pause mouse "Click any mouse button on selected data point"
     pause mouse keypress "Type a letter from A-F in the active window"
     pause mouse button1,keypress
     pause mouse any "Any key or button will terminate"

The variant "pause mouse key" will resume after any keypress in the active plot window. If you want to wait for a particular key to be pressed, you can use a loop such as:

     print "I will resume after you hit the Tab key in the plot window"
     plot <something>
     pause mouse key
     while (MOUSE_KEY != 9) {
         pause mouse key
     }


Subsections