TI-BASIC 83
TI-BASIC 83,TI-BASIC Z80 or simply TI-BASIC, is the built-in programming language for the Texas Instruments programmable calculators in the TI-83 series.[1] Calculators that implement TI-BASIC have a built in editor for writing programs. While the considerably faster Z80 assembly language[2]: 120 is supported for the calculators, TI-BASIC's in-calculator editor and more user friendly syntax make it easier to use. TI-BASIC is interpreted.[2]: 155 SyntaxThe syntax for TI-BASIC 83 is significantly different compared to most dialects of BASIC. For example, the language does not permit indentation with whitespace characters. It also depends on the TI calculator character set because it is tokenized.[2]: 25 Aside from these differences, TI-BASIC retains most control flow statements: conditionals, various loops, GOTOs and Labels. Conditionals and loops use Each command can be placed on a new line, or separated by a colon for brevity. As such, the following snippets are identical in function. :Disp 42 :Disp "FOOBAR and :Disp 42:Disp "FOOBAR In the above example the closing double quotes can be omitted because the colon causes all open markers to be closed. Unlike many high-level programming languages, TI-BASIC has only one assignment operator: ConditionalsTI-BASIC includes simple constructs using the :If condition :command Where :If condition :Then :command :command :End When using :If condition :Then :body one :Else :body two :End In this case the calculator evaluates Menu( statementIt does, however, have a :Menu("TITLE","FIRST",1,"SECOND",2,"THIRD",3) :Lbl 1 :body one :Lbl 2 :body two :Lbl 3 :body three ![]() The image is how the calculator renders the example above. In terms of functionality, the LoopsTI-BASIC includes three types of loops: For(
:For(variable,start,end[,increment]) :body :End While and Repeat
:While condition :body :End DS<( and IS>(
:DS<(variable,value) :Command Data types and variablesTI-BASIC is strongly and mostly statically typed. Most variables, besides lists and programs, have predefined names and allowed types. Each variable can usually only hold one data type, the exceptions are the numeric and all list variables which can hold either real or complex values. NumericThere are 27 numeric variables, ListLists are also supported through the use of six built-in lists, and user created lists with up to five characters as the name. They are capable of holding up to 999 elements. A list may hold entirely real numbers or entirely imaginary numbers. Some functions in the calculator are able to operate over entire lists, via Array programming. MatrixMatrices are supported through the use of ten built-in matrices. Matrices do not support user created names or complex numbers. StringsThere are ten built-in strings for storing variable text, named Other data typesThe TI-83 family supports several more data types other than numeric, list, and matrix types: token based data, screen image data, and graph database data. These data types cannot be directly manipulated by TI-BASIC. References
External linksWikibooks has a book on the topic of: TI-Basic Z80 Programming
|