The Wait Command
waitexample.gif

Command Summary

Suspends execution for a specified amount of time

Command Syntax

Wait [seconds]

Menu Location

2ND CATALOG to enter the Catalog.
W to go to commands starting with W.

Calculator Compatibility

TI-84+ CE OS 5.2 or higher

Token Size

2 bytes

The Wait command was introduced in TI-OS 5.2 for the TI-84+CE. The Wait command tells the calculator to wait for a specified number of seconds before continuing. The specified amount of seconds can be a decimal, as it is not limited to whole numbers. This command can be useful for displaying information momentarily before proceeding in a program. The Wait command functions similarly to the Pause command, but without the extra arguments.

:Disp "WAIT FOR IT!
:Wait 4
:Disp "Surprise

Advanced Uses

The Wait command is useful for facilitating automatic linking within programs. Since the Get( and GetCalc( commands only work when the sending calculator is in a preemptible state, including a small Wait delay will allow the other calculator to receive data.

Because the Wait command is relatively new, it may be advisable to avoid using it to ensure compatibility with older operating systems. Similar functionality can be achieved with the second optional argument to the Pause command.

Optimization

Traditionally it was recommended to use either a For( loop or the rand( command to create a delay within a program. The For( loop takes more space, and the rand( command uses more memory during execution.

:rand(100
can be
:Wait 1

Error Conditions

  • ERROR: INVALID is thrown if the Wait command is executed on the home screen.

Related Commands

.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Noncommercial 2.5 License.