Function: AddCue
Function: AddCue

Function: AddCue

AddCue ( CUE, CONTENT )

Adds a cue of a specific type to the TAME Response.

Parameters

Parameter Type Description
CUE VALUE(STRING) The cue type.
CONTENT VALUE(STRING) The cue content.

Returns

Returns nothing. Cannot be used in expressions.

What It Does

AddCue appends a Cue with an arbitrary type and content to TAME's Response. There are a set number of Cue types that are understood by all TAME Shells - this is for sending arbitrary types for other specialized shells that can understand them.

TAME Shells that do not understand a Cue type will ignore processing that Cue.

Example

NOTE: This page has special handling for the "uppercase" cue.

AddCue Example


world
{
	start()
	{
		textln("This prints a line of text.");
		addCue("text", "This does the same thing.\n");
		addCue("unhandled", "This cue is ignored.");
		
		// NOTE: The following is not a standard cue.
		addCue("uppercase", "This cue is handled (specifically on this page) by printing this content uppercase.");
		quit;
	}
}

Additional Technical Notes

Cues are processed by a Shell in the order that they have been added. Cues are not hierarchical.

The cue type is a string, but cues are expected to be handled whether or not they are sent in a specific character case ("text" and "TEXT" are the same type).

This does not prevent the author from sending other accepted cues like ERROR, FATAL, and QUIT that may have special behavior in all Shells.

There is currently no limit to how many cues can be added to a response, but you, the author, should use discretion in this regard, since different TAME implementations and systems can have different conceivable limits.

×

Modal Header