TI-BASIC/Disp

From Wikiversity
Jump to navigation Jump to search

Last time we used the function Disp, which displays whatever comes after it. Something has to be written after it, which is it's only parameter.

Parameters[edit | edit source]

A parameter is the requirement to use a function, unless you satisfy all parameters of a function the program doesn't fully comprehend what it is supposed to do, and will return an error. Disp will return an error if there is nothing after it, so it needs to have either a number (variable which is what the letters are really) or a quoted symbol. example;

PROGRAM:TEST
:Disp "=123ABθ"

More complex functions require full attention, and have many more parameters. For Example output( needs to be written as output(x,y,variable where x is the horizontal position in respect to the left side and y is the vertical position in respect to the top side. example;

PROGRAM:TEST
:Output(5,3,"HELLO"

will display as

prgmTEST



  HELLO

The parameters are that output has an x and a y and a variable, where x is on the screen size (between 1 and 16) and y as well (between 1 and 8).
back | next