Last modified on 18 January 2013, at 14:09

TI-Basic 84 Programming/Output

DispEdit

Disp, PRGM:I/O:3, is a command which will display a number, string, equation or other type of variable/literal given as arguments. Disp can accept an unlimited number of arguments seperated by commas (although it recommended to keep the number of arguments under 7 because after seven, for each consecutive argument the screen pushes everything else up passed the top of the screen), and will display each argument following the previous line.

Syntax: DispEdit

:Disp [arg][,arg2][,arg3][,arg4][,…argN]
  • Where arg,arg2,arg3,arg4 and all other arguments through argN are optional parameters. The number of arguments is only limited by the calculator memory. The arguments can be either a literal or variable of any type, except for Pic0-Pic9 and GDB0-GDB9.
  • For each argument, Disp displays the argument on the next line, starting from where the the cursor initially was located. If the display reaches the seventh line, the display will 'scroll' the rest of the screen up so that the argument can be displayed.
    • If an argument is a number, Disp displays it right-aligned
    • If an argument is a string:
      • it will display it left-aligned
      • if the string contains more than 16 characters string will be truncated and will display "..." at the end of the string
    • If an argument is too long to be displayed, the argument will be truncated and three dots will be placed at the end indicating such
  • If no argument is specified, the command just displays the home screen


Ex: Display LinesEdit

Assuming you have a homescreen like this,

5→X
               5
X+1
               6

and you executed this program,

:Disp "HELLO WORLD",52,X+1

you would have the following:

               5
X+1
               6
pgrmTEMP
HELLO WORLD
              52
               6
            Done

Ex: Empty LinesEdit

:Disp "","","HELLO WORLD"


HELLO WORLD

Ex: TruncatedEdit

:Disp "THIS LINE IS TOO LONG FOR ONE LINE"
THIS LINE IS TO…

PauseEdit

Pause, PRGM:8, displays an argument, then pauses execution afterwards.

Syntax: PauseEdit

:Pause [arg]
  • Where arg is either a literal or variable type of any {unverified} which Pause will display then pause execution until the enter key is pressed
    • Pause will display arg on the next line, starting from where the the cursor initially was located. If the display reaches the seventh line, the display will 'scroll' the rest of the screen up so that the argument can be displayed
    • If arg is a number, Pause displays it right-aligned
    • If arg is a string it will display it left-aligned
    • If an argument is too long to be displayed, the argument will be trunacated and three dots ('…') will be placed at the end indicating that the user can scroll left or right to view the entire argument
  • If no argument is specified, the command merely pauses the execution until enter is pressed without displaying anything

Ex: HelloEdit

:Pause "HELLO WORLD"

*It should be noted that the program execution would pause until enter is pressed.

Ex: PauseEdit

:Pause

*It should be noted that the program execution would pause until enter is pressed.

OutputEdit

Output, PGRM:I/O:6, allows the display of an argument in a location other than the next line. The item to be displayed is outputed to the specified cordinates supplied to the function. It is useful for formatted display and it can also be used, if it is the last command of a program, to stop "DONE" from displaying.

Syntax: Output()Edit

:Output(row,col,arg)
  • Where row is a number between 1 and 8 which determines the row location(vertically) arg is to be displayed.
  • Where col is a number between 1 and 16 which determines the column location (horizontially) arg is to be displayed
  • Where arg is the argument to be displayed. This can be a number, string or list.
    • arg is displayed from left to right
    • if arg is too long to fit on one line, the argument will carry over to the next, starting line at row+1,1.
      • if arg continues past the last line of the calculator (row 8), arg only displays the portion that fits into the screen


Ex: BasicEdit

:Output(2,3,"HELLO WORLD")

  HELLO WORLD

*HELLO WORLD is moved down one row (making it in the 2nd row) and moved right 2 times (making it in the 3rd column)

Ex: Too LongEdit

PROGRAM:TOOLONG
:Output(1,1,"THIS STRING IS TOO LONG")
prgmTOOLONG
THIS STRING IS T
OO LONG


Text()Edit

Text, 2nd:DRAW(PGRM):0, is a command very similar to Output, except that the arguments are displayed on the graph screen rather than on the homescreen which allows a more precise location of text. In addition, Text can accept multiple arguments and will display them one after another. It also allows both the smaller font (by default) and the larger font (if -1 is the first argument) to display the arguments.

Syntax: Text() SmallEdit

This form displays the arguments in the calculator's smaller font.

Text(row,col,arg[,arg2][,arg3][,arg4][,…argN]
  • Where row is the vertical displacement of the arguments
    • row is a number between 0 and 61, where 0 is the top of the screen, and 61 is the bottom
  • Where col the horizontially displacement of the arguments
    • col is a number between 0 and 92, where 0 is the very left of the screen, and 92 is the right side of the screen minus one pixel (for the run cursor)


Syntax: Text() LargeEdit

This form displays the arguments in the calculator's larger font.

Text(-1,row,col,arg[,arg2][,arg3][,arg4][,…argN]
  • Where row is the vertical displacement of the arguments
    • row is a number between 0 and 61, where 0 is the top of the screen, and 61 is the bottom
  • Where col the horizontially displacement of the arguments
    • col is a number between 0 and 92, where 0 is the very left of the screen, and 92 is the right side of the screen minus one pixel (for the run cursor)



Previous: Basic Variables
Next: Input
Table of Contents: TI-Basic 84 Programming