TI-BASIC Wiki
Advertisement

Disp[]

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 past the top of the screen), and will display each argument following the previous line.

Syntax: Disp[]

: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 {unverified}.
  • 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 Lines[]

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
prgmTEMP
HELLO WORLD
              52
               7
            Done


Ex: Empty Lines[]

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




HELLO WORLD


Ex: Truncated[]

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


THIS LINE IS TO…


Pause[]

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

Syntax: Pause[]

: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: Hello[]

:Pause "HELLO WORLD"

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


Ex: Pause[]

:Pause

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


Output[]

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()[]

: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: Basic[]

: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 Long[]

:Output(1,1,"THIS STRING IS TOO LONG")


THIS STRING IS T
OO LONG


Text()[]

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() Small[]

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 62, where 0 is the top of the screen, and 62 is the bottom
  • Where col the horizontially displacement of the arguments
    • col is a number between 0 and 94, where 0 is the very left of the screen, and 94 is the right side of the screen

Syntax: Text() Large[]

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 62, where 0 is the top of the screen, and 62 is the bottom
  • Where col the horizontially displacement of the arguments
    • col is a number between 0 and 94, where 0 is the very left of the screen, and 94 is the right side of the screen
Advertisement