Joke Collection Website - Mood Talk - How to program Casio calculator?

How to program Casio calculator?

There are many kinds of Casio calculators, and the programming language of each Casio calculator is very different. For example, Casio 4800 and Casio 5800 calculators have many different programming statements and keywords. If you just ask to enter the calculator programming interface, for Casio 5800 calculator, it is: "MODES RTUP"-key 5, Prog-key 1.

First, it is simple to use. One of the biggest benefits is that as long as you have a junior high school level and have a general understanding of functions by using mathematical formulas, you can basically understand the built-in functions of casio4x00 and carry out simple programming. It is very suitable for beginners of measurement and lovers of mathematical programs to learn, and also suitable for professional surveyors to use and improve their abilities. Different from other majors, computer programming requires a high level of expertise.

Second, the cost is low, and the price is around 400 yuan.

Third, it is convenient to carry and small in size. You can put it in your pocket at any time. The better programming models of Casio series are Casio 4500 (hereinafter referred to as 4500) and Casio 4800 (hereinafter referred to as 4800). It seems that a Casio 4850 has been launched recently. ) The memory of the former is smaller, only 1 103 bytes, which can cope with some simple formula calculations and scientific calculations. However, due to the limited memory, it is more difficult for some complicated or complicated ones. 4800 is much better than 4500. The memory of 4800 reaches 4500 bytes, and the display screen is several times larger than that of 4500, which can display data more accurately, and the built-in function characters are clear at a glance. And it has a simple man-machine conversation function, and a menu submenu appears. 4800 also increases the Gadro constant and the gravitational length constant of 4500. See the operating instructions for details. 4800 has many practical functions. For example, it has the function of solving formulas, and the principle is to solve equations by Newton method.

For example, there is an equation: a=2b-c to find the value of b when a=2 and c=5. Store the equation in the formula memory: press the answer key "Solve" to enter 2, c to enter 5, and then press the answer key "Solve". The calculator shows: b=3.5. This function is called automatic answer function. At the same time, it is also very practical, and there is usually a small formula that is often used in practical work and can be used to complete it. The programming language used by 4800 can be regarded as a simple BASIC language, and some commands such as GOTO and PAUSE are exactly the same as the BASIC language. Now let's talk about the programming language of 4800. Its main command is:

1 、= >? Conditional branch establishment symbol, whose usage is equivalent to IF in BASIC? Then (suppose the statement is equivalent to what if? So, is IF equivalent to a condition? It is equivalent to the result)

2、≦& gt; ? Conditional transfer is not a symbol, and its usage is equivalent to IF? ELSE statements are usually used together, which is equivalent to IF? then what ELSE statement (its English form is generally IFA > bthenc > delseifb > athe? )

3、_? Conditional branch end symbol, and => and ≦ > Used together, at the end of the conditional statement.

4、LbI? Mark the command. Used to mark a sentence as a transition. It can be followed by letters, numbers and symbols, but it cannot exceed two bytes. If the number ≥ 10 cannot be used as a line sign, otherwise an error message will appear.

5、Goto? Transfer the order (conditionally). Conditional statements can be added in front, just like the GOTO function in BASIC. Usually used with LbI, if the line number passed is invalid, it will display: GOERROR (see manual for details) error message.

6、Dsz? Decreasing cycle command. The number of unknowns can be reduced.

7、Isz? Incremental loop command.

8. pause? Pause the command. Can be followed by an integer n between 0 and 9, let a data display n/2 seconds, and then continue to run the following program. It is regarded as a statement.

9、Fixm? Variable lock command. This command can treat all its variable values (A~Z) as fixed numbers. When the program runs, you will not need to input variables (except the variables in "{}"), but use the original values in memory to complete the calculation.

10、{}? Variable input command. There are only numbers that often change when the program is recycled, such as mileage and width. It can be entered in many ways, such as {AB}{A, B}{AB}. Note "{"and "}" must be entered in pairs. Otherwise, a SynERROR (see the manual for details) error message will appear.

1 1 、= 、≦、>、

12、Prog? Shortcut keys for opening programs under normal circumstances. In the process of programming, it is to run the subroutine command, followed by the subroutine name (be sure to put quotation marks and pay attention to spaces, otherwise there will be a SynERROR error message (see the manual for details).

13、↓? Line breaks, only the calculation process is kept, and the calculation results are not displayed. You can also use: instead when you don't want to pack it.

14、_? Data display command. This command will wrap automatically after input. Keep the calculation process and display the calculation results. There is a general principle: ① learn to use the language of the program and make the program as concise as possible; We should make the program as concise as possible, and we must omit what can be omitted. There are too many bytes in the tedious statement, which can only slow down the calculation speed of the calculator, without any benefit, and it consumes a lot of memory. It is very important to learn to save bytes and use symbols. In particular, use calculator statements flexibly, because it will save you more bytes and achieve the desired results. For example, the next program uses Dsz (decrement loop command) flexibly. For example, it can enter 10 values and calculate the average of 10 values. The average value of 10 requires the prompt symbol of 1 1 number. But if you learn to use Dsz flexibly, you only need three, which greatly saves the occupation of bytes. The sample program is as follows:

A= 10

C=0

Lbi 1

{B}

C=B+C

DszA

Goto 1

c \u 10

However, it should be noted that if you are a beginner or are not skilled in programming, you must first list the program steps step by step according to your own ideas, and then try to simplify the modification after making sure that you can calculate correctly, otherwise it will only make too many program errors; ② Minimize the number of subroutines contained in the program; Too many subroutines will lead to loose program structure, and some computer main programs need three or four subroutines. Too many subroutines will only lead to disorder and confusion between programs. Too many subroutines are troublesome to find when using. Besides, there are too many subroutines. If there is a mistake in one link, it is difficult to find it. When writing a program, you should write as few subroutines as possible, and even if you want to write subroutines, you should pay more attention, especially where it is easy to make mistakes. If you know more about subroutines, you can share one program with several main programs, which will reduce the number of bytes needed and simplify the program. The sample program is as follows:

CXCD

Lbi 1Lbi 1

Prog"V"Prog"V "

B=L-(K-S)_B=L+(K-S)_

Goto 1Goto 1

V

Y=√A2B2+B2X2÷A

③ Use as little or no extended variable memory as possible, such as A[ 1], A[2], etc. Using extended memory is a practice that does more harm than good. Each expansion of a memory will reduce the capacity of 10 bytes, and each expansion memory will occupy at least 4 bytes, a net increase of 3 compared with an A~Z variable. Sometimes I feel that variable memory is not enough. Actually, that's not the case. The number of general program variables rarely exceeds 26, but you just don't know how to use it. Generally speaking, there is no need to consider variable duplication between two relatively independent program steps. For a program, as long as it is not a fixed variable (variable in {}), that is, those values calculated for the next calculation. We can get some calculations by repeatedly assigning values. Anyway, this quantity will change in the next cycle. Understand the meaning and precautions of various commands, and you can program them. Examples are as follows:

CX plan name

Lbl0↓ Start marking command statement

QMNFJ↓ Data input statement (refers to the invariants in formula loop operation)

{KDE}↓ Data input statement (refers to the variable when the formula is operated circularly)

S = k-q: g = f+j ↓ formula operation command

X=M+ScosF↓ Formula operation command

Y=M+SsinF↓ Formula operation command

Prog "j" ↓ Run subroutine command

Goto0↓ Loop operation statement

J subroutine name

H=X+DcosG_ formula operation, data display language

I=Y+DsinG_ formula operation, data display language

T = x-ecosg _ formula operation, data display language

U = y-esing _ formula operation, data display language

Finally, the calculator state setting statement is the most easily overlooked. If the unit is preset, the calculator will default that the unit it uses must be converted in the next unit conversion, otherwise the calculation result will be wrong. Small prompt symbols can be clearly found in the lower left corner of the display screen: for example, D stands for the current default unit, R stands for radian, and G stands for gradient.