Function: Pause
Function: Pause

Function: Pause

Pause ( )

Adds a PAUSE cue to the response, which signals the shell to pause processing of cues until the user resumes it again.

Parameters

No Parameters

Returns

Returns nothing. Cannot be used in expressions.

What It Does

Adds a user-resumable pause to the list of cues in the response. All TAME Shells interpret a PAUSE cue as, "halt until the user says to continue." This does not hold up the engine in any way - the pause happens entirely in the shell. Pausing is useful if you don't want to print walls of text to the screen and want to give the user a moment to read what was just displayed.

This is a convenience function, and is functionally equivalent to:


	addCue("pause", "");

Example

NOTE: Running this in debug mode will not actually pause, but you'll see how it appears in response cues.

Pause Example


world
{
	start()
	{
		textln("This will count up from 0 to 9, pausing at 5.");
		pause();
	
		local x = 0;
		while (x < 10)
		{
			textln(x);
			if (x == 5)
				pause();
			x = x + 1;
		} 
		quit;
	}
}

See Also

AddCue() — Adds cues to the Response.

Additional Technical Notes

The handling of a PAUSE cue does not require a particular type of input for continuing - it is up to the shell to provide that, and it must be user-interactable.

Although all TAME shells must handle PAUSE, there may be a few shells that will not make this possible. In those cases, PAUSE will be skipped during cue processing.

×

Modal Header