Parameter | Type | Description |
---|---|---|
MESSAGE | VALUE(STRING) | The message to output (plus a newline). |
Returns nothing. Cannot be used in expressions.
Prints a message to the screen with a newline appended to it.
Specifically, this adds a TEXT cue to the response with the provided message as the content, plus a newline added to the end of the message. Processing a TEXT and TEXTF cue is meant to print something to the screen in all TAME Shells. The input parameter is transformed to a string, no matter what value type it originally is.
This is a convenience function, and is functionally equivalent to:
addCue("text", message + "\n");
It is up to the TAME shell to determine how to render the text. Authors should not use the text functions to meticulously lay out text, for example: adding whitespace in order to get text to appear in a specific location on the screen. If a TAME shells has a method for doing this sort of thing, that should be employed rather than relying on the behavior of a specific medium. Authors should also be aware about shells that employ use of different fonts or other textual effects.
All TAME shells accumulate TEXT and TEXTF cue output as through it were printed in one block. Other cues like WAIT and PAUSE do not interrupt this behavior, unless the handling of a cue requires output to the same place that text will also be output to, but for the most part, you can rely on behavior like newlines terminating a paragraph or line.
world
{
start()
{
textln("apple");
textln("orange");
textln("pear");
textln("grape");
// not just text
textln(5);
textln(3.0);
textln(Infinity);
textln(8 + 3 * 15);
quit;
}
}
AddCue() — Adds cues to the Response.
Strings in TAME are Unicode, so most characters should output how the author intends, but that may also depend on locale, encoding, or the Shell used for displaying. The Java and Browser JS implementations contain ways to easily parse formatted text.