Casio BASIC

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Casio BASIC is a programming language used in the Casio calculators such as the Classpad, PRIZM Series, fx-9860G Series, fx-5800P, Algebra FX and CFX graphing calculators.

This programming language has nothing to do with the more or less standard BASIC, which incorporated from the beginning of the 80s, the so-called "Pocket computers" or "Pocket PC" from Casio, among which the FX series can be found. -702P, Series 100 (PB-100), Series 700 (PB-100), and many others. The version of BASIC of these machines is called Casio POCKETPC BASIC and a complete history of that version can be found on http://foroplus.com/basic/casiopbasic.php.

The language is a linear structured, BASIC-based programming language. It was devised to allow users to program in commonly performed calculations, such as the Pythagorean theorem and complex trigonometric calculations.

Output from the program can be in the form of scrolling or located text, graphs, or by writing data to lists in the calculator memory. Casio also makes label printers which can be used with rolls of paper for the Casio BASIC calculators.[1] Programs, variables, data, and other items can be exchanged from one calculator to another (via SB-62 cable) and to and from a computer (via USB cable). All new models of Casio graphing calculators have both ports and include both cables.

The Casio calculators, as with those of many of the other big three manufacturers' machines, can acquire data from instruments via a data logger to which probes for temperature, light intensity, pH, sound intensity (dBA), voltage and other electrical parameters, as well as other readings, and custom probes to attach to the data logger [2] can be built and configured for use with the data logger and calculator. Existing instruments can also be modified to interface with the calculator-data logger, in order to collect such data including such things as weather instruments and means of collecting data such as pulse, blood pressure, galvanic skin resistance, EKG and so on.

Numerical data can be stored in the lists and matrices available on Casio calculators. This data can be used to create sprites for non-text programs.[3] In this way, the language can also be used to create games, such as Pong, Monopoly and role-playing games.

Like Tiny BASIC, the BASIC interpreter for Casio BASIC restricts variable names to the letters A-Z with just one predefined array (in Casio BASIC, Z, as compared to A in Level I BASIC and @ in Palo Alto Tiny BASIC). For Casio's graphical calculators, italic x, y, r and θ are also used as variable names for certain calculations. Therefore extending the array size of predefined variable names from 26 to 30.

Examples[edit]

Hello world in casio BASIC:

"Hello World!"

variables:

5->a

Loops:

label 1

"forever!"

goto 1

A complete performance test program of 1st generation Casio BASIC on a machine of Series FX-7000G. This test is used to rank the performance of a programming calculator as is stated on http://foroplus.com/basic/rendimiento.php:


500N
Lbl 2
10L
Lbl 1
LX
X+1X
X-4.567E-4X
X+70X
X-69X
X*7X
X/11X
L-1L
L0Goto 1
ln XX
sin XX
XX
XX
N-1N
N0Goto 2
X

References[edit]

  1. ^ Casio CFX-9850 PB Users' Manual, Chapter 21
  2. ^ Casio CFX-9850 PB Users' Manual, Chapter 17
  3. ^ "Casio BASIC matrix sprite tutorial". Archived from the original on 2014-05-19. Retrieved 2014-05-19. CS1 maint: discouraged parameter (link)

External links[edit]

See also[edit]