TI-BASIC

Uses your system voice; voice and rate in settings.

Snapshot

≈ 5 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

TI-BASIC is the official name of several BASIC-like programming languages used by Texas Instruments' graphing calculators. It is a language family of three different and partially-incompatible versions, released on different products: * TI-BASIC 83 for the Zilog Z80-based TI-83 and TI-84 Plus series * TI-BASIC 89 for the Motorola 68000-based TI-89 and TI-92 series * TI-BASIC Nspire for the ARM-based TI-Nspire series TI rarely refers to the language by name, but the name TI-BASIC has been used in some developer documentation. Built into every TI graphing calculator, it is the primary method of programming available to the user. On most calculators, assembly language can also be used, and C cross-compilers exist for translation into assembly: TIGCC for 68000-based calculators, and SDCC for Z80-based calculators; these do not run on the calculator itself. As an interpreted language, TI-BASIC is considerably slower than assembly, making it better suited to writing programs to quickly solve math problems or perform repetitive tasks, rather than programming games or graphics-intensive applications. TI-BASIC programs (usually written in TI-BASIC 83) can also be found in math textbooks. Despite its limitations, a growing community of TI-BASIC programmers has developed, mainly on the Internet.

TI-BASIC is the official name of several BASIC-like programming languages used by Texas Instruments' graphing calculators. It is a language family of three different and partially-incompatible versions, released on different products: TI-BASIC 83 for the Zilog Z80-based TI-83 and TI-84 Plus series TI-BASIC 89 for the Motorola 68000-based TI-89 and TI-92 series TI-BASIC Nspire for the ARM-based TI-Nspire series TI rarely refers to the language by name, but the name TI-BASIC has been used in some developer documentation. Built into every TI graphing calculator, it is the primary method of programming available to the user. On most calculators, assembly language can also be used, and C cross-compilers exist for translation into assembly: TIGCC for 68000-based calculators, and SDCC for Z80-based calculators; these do not run on the calculator itself. As an interpreted language, TI-BASIC is considerably slower than assembly, making it better suited to writing programs to quickly solve math problems or perform repetitive tasks, rather than programming games or graphics-intensive applications. TI-BASIC programs (usually written in TI-BASIC 83) can also be found in math textbooks. Despite its limitations, a growing community of TI-BASIC programmers has developed, mainly on the Internet. Expressions use infix notation, with standard operator precedence. Many statements demand arguments in parentheses, similar to the syntax used for mathematical functions. The syntax for assignment (copying of data into a variable) is unusual with respect to most conventional programming languages for computers; rather than using a BASIC-like let statement with an equal sign, or an Algol-like := operator, TI-BASIC uses a right-arrow sto→ operator with the syntax: source → destination. This is similar to several Japanese calculators, such as from Casio, Canon and Sharp, that have often employed a similar syntax, ever since the first mass market Japanese alphanumerical calculators appeared in the late 1970s and early 1980s. If condition Then ... Else ... End For(variable,start,stop,step) ... End While condition ... End Repeat condition ... End Unusual for a high level language, TI-BASIC implementations include (Increment and Skip if Greater Than) and (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 as destinations for Goto statements or Menu( functions 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. Equation variables, including Y 0 - Y 9 , r 1 - r 6 , and u , v , w . These are essentially strings which store equations. They are evaluated to return a value when used in an expression or program. Specific values, (constant, C) can be plugged in for the independent variable (X) by following the equation name (dependent, Y) by the constant value in parentheses. In the example below, "(4)" is used (for no particular reason). ( Y 1 (4) would return the value of Y 1 at X=4) Data types that cannot be directly manipulated include: Pictures ( Pic0 - Pic9 ) Background ( Image0 - Image9 ) Programs ( prgm ) Graph databases ( GDB0 - GDB9 ) Color ( BLUE , RED ,..., GRAY ) (15 colors in total) If X=0 Then Disp A Stop End XA→A X-1→X prgmFACT Define fact(x)=Func If x=0 Return 1 Return x*fact(x-1) EndFunc Input "Input a number", n Disp "n! = " Disp fact(n) EndPrgm If x=0 Return 1 If x

Text derived from https://en.wikipedia.org/w/index.php?oldid=1377881874 under CC BY-SA 4.0; modifications have been made.