Skip to content

The Text Command

Command Summary Command Syntax Calculator Compatibility Token Size
Displays a line of text in a dialog box. Text string of text This command works on all calculators. 3 bytes

Starting in the program editor:
- Press F3 to enter the I/O menu.
- Press 1 to enter the Dialog submenu.
- Press 1 to select Text.

The Text Command

On its own, the Text command displays a simple dialog box with a line of text (left-aligned) inside. It can also be used inside a 68k:Dialog..EndDlog block, to add a line of text to a more advanced dialog.

The text must be a single string; but you can build one out of smaller strings and other data types using the & and 68k:string() commands.

Text will give an error if the string is too long — how long varies from model to model, and depending on if Text is being used inside or outside Dialog..EndDlog, but in general anything below 30 characters is safe (otherwise, you should test the dialog first to make sure everything fits). It uses the small, variable-width font on the TI-89 and TI-89 Titanium, and the normal fixed-width font on widescreen calculators.

Advanced Uses

You can add Text "" to a dialog to skip a line between two other elements.

Error Conditions

130 - Argument must be a string happens when Text is used to display other data types without using 68k:string() first.
230 - Dimension happens when the line of text is too long to fit in a dialog box.

See Also

Authors: KG