Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Graphing calculator
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Programming == [[File:TI-84 Plus IO.jpeg|thumb|right|Typical ports on a graphing calculator. These contain a 2.5 mm I/O port for connecting to other calculators and a Mini USB port for connecting to a PC.]] Most graphing calculators, as well as some non-graphing [[scientific calculator]]s and programmer's calculators can be programmed to automate complex and frequently used series of calculations and those inaccessible from the keyboard. The actual programming can often be done on a computer then later uploaded to the calculators. The most common tools for this include the PC link cable and software for the given calculator, configurable text editors or hex editors, and specialized programming tools such as the below-mentioned implementation of various languages on the computer side. Earlier calculators stored programs on magnetic cards and the like; increased memory capacity has made storage on the calculator the most common implementation. Some of the newer machines can also use memory cards. Many graphing and scientific calculators will tokenize the program text, replacing textual programming elements with short numerical tokens. For example, take this line of TI-BASIC code: <code>Disp [A]</code> . In a conventional programming language, this line of code would be nine characters long (eight not including a newline character). For a system as slow as a graphing calculator, this is too inefficient for an [[interpreted language]]. To increase program speed and coding efficiency, the above line of code would be only three characters. "Disp_" as a single character, "[A]" as a single character, and a newline character. This normally means that single byte chars will query the standard [[ASCII]] chart while two byte chars (the Disp_ for example) will build a graphical string of single byte characters but retain the two byte character in the program memory. Many graphical calculators work much like computers and use versions of 7-bit, 8-bit or 9-bit ASCII-derived character sets or even [[UTF-8]] and [[Unicode]]. Many of them have a tool similar to the [[Character Map (Windows)|character map]] on Windows. They also have [[BASIC]] like functions such as chr$, chr, char, asc, and so on, which sometimes may be more Pascal or C like. One example may be use of ''ord'', as in [[Pascal (programming language)|Pascal]], instead of the ''asc'' of many Basic variants, to return the code of a character, i.e. the position of the character in the collating sequence of the machine. A cable and/or [[IrDA]] transceiver connecting the calculator to a computer make the process easier and expands other possibilities such as on-board spreadsheet, database, graphics, and word processing programs. The second option is being able to code the programs on board the calculator itself. This option is facilitated by the inclusion of full-screen text editors and other programming tools in the default feature set of the calculator or as optional items. Some calculators have [[QWERTY]] keyboards and others can be attached to an external keyboard which can be close to the size of a regular 102-key computer keyboard. Programming is a major use for the software and cables used to connect calculators to computers. The most common programming languages used for calculators are similar to keystroke-macro languages and variants of [[BASIC]]. The latter can have a large feature set—approaching that of BASIC as found in computers—including character and string manipulation, advanced conditional and branching statements, sound, graphics, and more including, of course, the huge spectrum of mathematical, string, bit-manipulation, number base, I/O, and graphics functions built into the machine. Languages for programming calculators fall into all of the main groups, i.e. machine code, low-level, mid-level, high-level languages for systems and application programming, scripting, macro, and glue languages, procedural, functional, imperative &. object-oriented programming can be achieved in some cases. Most calculators capable to being connected to a computer can be programmed in assembly language and machine code, although on some calculators this is only possible through using exploits. The most common assembly and machine languages are for [[TMS9900]], [[SuperH|SH-3]], [[Zilog Z80]], and various [[Motorola]] chips (e.g. a modified [[68000]]) which serve as the main processors of the machines although many (not all) are modified to some extent from their use elsewhere. Some manufacturers do not document and even mildly discourage the assembly language programming of their machines because they must be programmed in this way by putting together the program on the PC and then forcing it into the calculator by various improvised methods. Other on-board programming languages include purpose-made languages, variants of [[Eiffel (programming language)|Eiffel]], [[Forth (programming language)|Forth]], and [[Lisp (programming language)|Lisp]], and Command Script facilities which are similar in function to batch/shell programming and other [[Scripting language#Glue languages|glue languages]] on computers but generally not as full featured. Ports of other languages like [[BBC BASIC]] and development of on-board interpreters for [[Fortran]], [[REXX]], [[AWK]], [[Perl]], [[Unix shell]]s (e.g., [[bash (Unix shell)|bash]], [[Z shell|zsh]]), other shells ([[DOS]]/[[Windows 9x]], [[OS/2]], and [[Windows NT]] family shells as well as the related [[4DOS]], [[Take Command Console|4NT]] and [[4OS2]] as well as [[DIGITAL Command Language|DCL]]), [[COBOL]], [[C (programming language)|C]], [[Python (programming language)|Python]], [[Tcl]], [[Pascal (programming language)|Pascal]], [[Delphi (programming language)|Delphi]], [[ALGOL]], and other languages are at various levels of development. Some calculators, especially those with other PDA-like functions have actual operating systems including the TI proprietary OS for its more recent machines, [[DOS]], [[Windows CE]], and rarely [[Windows NT 4.0 Embedded]] et seq, and [[Linux]]. Experiments with the [[TI-89]], [[TI-92 series|TI-92]], [[TI-92 Plus]] and [[Voyage 200]] machines show the possibility of installing some variants of other systems such as a chopped-down variant of [[CP/M#The 16-bit world|CP/M-68K]], an operating system which has been used for portable devices in the past. Tools which allow for programming the calculators in C/C++ and possibly Fortran and assembly language are used on the computer side, such as [[HPGCC]], TIGCC and others. Flash memory is another means of conveyance of information to and from the calculator. The on-board BASIC variants in TI graphing calculators and the languages available on the [[HP-48 series]] can be used for rapid prototyping by developers, professors, and students, often when a computer is not close at hand. Most graphing calculators have on-board spreadsheets which usually integrate with Microsoft Excel on the computer side. At this time, spreadsheets with macro and other automation facilities on the calculator side are not on the market. In some cases, the list, matrix, and data grid facilities can be combined with the native programming language of the calculator to have the effect of a macro and scripting enabled spreadsheet.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)