Disp
From TI-BASIC Wiki - The free TI-BASIC encyclopedia
:Disp text
A Disp command will display text or a variable on the next line of the output screen. Unlike Output(, Disp will not flow text to the next line, but it will scroll the screen if it needs a new line to write to.
Disp can accept anything that can be displayed as text as a parameter: Reals, Strings, Lists and Matricies are all acceptable parameters.
In TI-BASIC 84, Real and Complex values will be right aligned, everything else will be left aligned. In TI-BASIC 89, All values are left aligned.
:Disp text1,text2[,text3,...,textn]
If there are multiple lines to display, multiple parameters can be used. Each parameter will be displayed on a new line. Parameters are separated with commas.
:Disp
In TI-BASIC 84, this will show the Home Screen. In TI-BASIC 89, this shows the PrgmIO Screen.
[edit] Location
- PRGM
- I/O
- 3: Disp
[edit] Example
PROGRAM:CYLINDER :ClrHome :Prompt R,H :πR2H→V :Disp "VOLUME IS",V
The last line :Disp "VOLUME IS",V will display the string VOLUME IS and because of the , it will show the value of V on the next line.
By entering 1.5 as the Radius (R) and 3 as the height (H) it will calculate the volume (V) of a cylinder like this:
R=?1.5
H=?3
VOLUME IS
21.20676041
