It is, for many applications, the most convenient way to program any TI calculator, since the capability to write programs in TI-BASIC is built-in. Assembly language (often referred to as "asm") can also be used, and C compilers exist for translation into assembly: TIGCC for Motorola 68000 based calculators, and Z88DK for Zilog Z80 based calculators. However, both of them are cross-compilers, not allowing on-calculator programming. Although TI-BASIC is considerably slower when compared to assembly, (not as useful for programming fast applications and games) it is very useful for writing programs quickly to solve math problems (formulae, etc) and for performing repetitive tasks, with some math instruction books even providing programs in TI-BASIC (usually for the widespread variant used by the TI-82/83/84 series).
Although it is somewhat minimalist compared to programming languages used on computers, TI-BASIC is nonetheless an important factor in the programming community. Because TI graphing calculators are required for advanced mathematics classes in many high schools and universities, TI-BASIC is often the first glimpse many students have into the world of programming. Learning to program in TI-BASIC is a relatively easy task, encouraging potential programmers to explore the field of computer science.
The syntax of all versions of TI-BASIC are somewhat different from typical BASIC implementations. The language itself has some basic structured programming capabilities, but makes limited to no use of or allowance for white space or indentation. It is also dependent on a slightly nonstandard character set, with specific characters for assignment (the right arrow, not readily available in most character sets), square and cube roots, and other mathematical symbols, as well as tokenized entry and storage for keywords. All statements begin with a colon, which also functions as a statement separator within lines.
Expressions use infix notation, with standard operator precedence. Many statements include their arguments in parentheses, similar to the syntax used for mathematical functions. The assignment syntax is unusual; rather than using a let statement or an equals sign, TI-BASIC uses a right-arrow operator with the syntax: source → destination.
Control flow statements include if-then-else blocks, for loops, while loops, and repeat loops, though no switch statements. Unusually for a high level language, TI-BASIC implementations include IS> (Increment and Skip if Greater Than) and DS< (Decrement and Skip if Less Than) statements, constructs generally associated with assembly languages. Sections of programs can be labeled; however, particularly on the Z80 models, the labels function primarily as destinations for GOTO statements rather than as program or block labels.
Availability of functions and subroutines depends on the implementation; the versions available on the TI-82-descended calculators do not even support a GOSUB-like function, though it is possible to call programs from within each other and share variables between programs. TI-89/92-based designs can have access to shared functions, essentially programs capable of returning a value.
An entirely different command is required to clear the screen in the TI-89. Since output is generally displayed on the ProgramIO screen, the "ClrIO" command is required to clear the output screen. There exists a "ClrHome" command on the TI-89, and it performs its function - namely, clearing the Home screen. For programming purposes, however, this command is essentially useless.
:"clears the home screen, then displays the message between the quotes"
:Disp "HELLO, WORLD!"
:Disp "Hello, World!"
:Input "NUMBER OF VARIABLES ",A
:If A<1 or fPart(A)
:Input "VAR ",B
In addition, lists are important for saving save game data and highscore data in programs. This is better than storing highscore or save game information as a variable, as variables are commonly used. Lists on the TI-82 cannot have custom names (L1 through L6 are preprogrammed).
The "If A<0 or fPart(A)" statement checks to see if the variable A is a negative number or a non-integer. If so, the program is stopped by the Return statement. If the condition is not true, then the program continues on to the rest of the code. The first variable is used to define L1. In the For(loop, only the commands between For(N,2,A) and the first End are considered. Every time the For( loop is executed, an input is asked for, and the element is added to the end of the list, and saved. By this time, the list L1 should have a dim(L1) = A and be ready for manipulation.
:"A user interface for FACT"
:1→A:"An accumulator of sorts. The answer will be stored here."