Download Print this page

Advertisement

Programming
8-1
Basic Programming Steps
8-2
Program Mode Function Keys
8-3
Editing Program Contents
8-4
File Management
8-5
Command Reference
8-6
Using Calculator Functions in Programs
8-7
Program Mode Command List
8-8
Program Library
This unit comes with approximately 144 kbytes of memory.
• You can check how much memory has been used and how much remains
by entering the SYSTEM Mode from the Main Menu, and then pressing
1(Mem). See "9-2 Memory Operations" for details.
Chapter
19990401
8

Advertisement

   Also See for Casio ALGEBRA FX 2.0

   Related Manuals for Casio ALGEBRA FX 2.0

   Summary of Contents for Casio ALGEBRA FX 2.0

  • Page 1

    Chapter Programming Basic Programming Steps Program Mode Function Keys Editing Program Contents File Management Command Reference Using Calculator Functions in Programs Program Mode Command List Program Library This unit comes with approximately 144 kbytes of memory. • You can check how much memory has been used and how much remains by entering the SYSTEM Mode from the Main Menu, and then pressing 1(Mem).

  • Page 2: Basic Programming Steps

    8-1-1 Basic Programming Steps 8-1 Basic Programming Steps Description Commands and calculations are executed sequentially, just like manual calculation multistatements. Set Up 1. From the Main Menu, enter the PRGM Mode. When you do, a program list appears on the display. Selected program area (use f and c to move) Files are listed in the alphabetic sequence of their...

  • Page 3

    8-1-2 Basic Programming Steps ○ ○ ○ ○ ○ Example 1 To calculate the surface area (cm ) and volume (cm ) of three regular octahedrons when the length of one side is 7, 10, and 15 cm Store the calculation formula under the file name OCTA. The following are the formulas used for calculating surface area S and volume V of a regular octahedron for which the length of one side A is known.

  • Page 4: Program Mode Function Keys

    8-2-1 Program Mode Function Keys 8-2 Program Mode Function Keys • {NEW} ... {new program} u When you are registering a file name • {RUN}/{BASE} ... {general calculation}/{number base} program input Q } ... {password registration} • {Q • {SYBL} ... {symbol menu} u When you are inputting a program ——...

  • Page 5

    8-2-2 Program Mode Function Keys u When you are inputting a program —— 2(BASE) • {JUMP}/{SRC} • {d~o} ... {decimal}/{hexadecimal}/{binary}/{octal} value input • {LOG} ... {logical operators} • {DISP} ... conversion of displayed value to {decimal}/{hexadecimal}/{binary}/{octal} • {SYBL} ... {symbol menu} •...

  • Page 6: Editing Program Contents

    8-3-1 Editing Program Contents 8-3 Editing Program Contents k Debugging a Program A problem in a program that keeps the program from running correctly is called a “bug,” and the process of eliminating such problems is called “debugging.” Either of the following symptoms indicates that your program contains bugs that require debugging.

  • Page 7

    8-3-2 Editing Program Contents k Using an Existing Program to Create a New Program Sometimes you can input a new program by using a program already in memory as a base. Simply recall the existing program, make the changes you need, and then execute it. ○...

  • Page 8

    8-3-3 Editing Program Contents Now edit OCTA to produce the TETRA program. 1. Edit the program name. 6(g)2(REN)ATETRAw 2. Edit the program contents. 2(EDIT) eeeeDD cdDbc 3. Try running the program. 1(EXE) or w hw(Value of A) wbaw wbfw 19990401...

  • Page 9: Searching For Data Inside A Program

    8-3-4 Editing Program Contents k Searching for Data Inside a Program ○ ○ ○ ○ ○ Example To search for the letter “A” inside the program named OCTA 1. Recall the program. 2. Press 2(SRC) or w and input the data you want to find. 2(SRC) av(A) 3.

  • Page 10: File Management

    8-4-1 File Management 8-4 File Management k Searching for a File u To find a file using initial character search ○ ○ ○ ○ ○ Example To use initial character search to recall the program named OCTA 1. While the program list is on the display, press 6(g)1(SRC) and input the initial characters of the file you want to find.

  • Page 11

    8-4-2 File Management k k k k k Editing a file name ○ ○ ○ ○ ○ Example To change the name of a file from TRIANGLE to ANGLE 1. While the program list is on the display, use f and c to move the highlighting to the file whose name you want to edit and then press 6(g)2(REN).

  • Page 12

    ○ ○ ○ ○ ○ Example To create a program file under the name AREA and protect it with the password CASIO 1. While the program list is on the display, press 3(NEW) and input the file name of the new program file.

  • Page 13

    ○ ○ ○ ○ ○ Example To recall the file named AREA which is protected by the password CASIO 1. In the program list, use f and c to move the highlighting to the name of the program you want to recall.

  • Page 14: Command Reference

    8-5-1 Command Reference 8-5 Command Reference k Command Index Break ....................... 8-5-6 ClrGraph ....................... 8-5-11 ClrList ......................8-5-11 ClrText ......................8-5-12 ClrMat ......................8-5-12 DispF-Tbl, DispR-Tbl ..................8-5-12 Do~LpWhile ..................... 8-5-5 DrawDyna ..................... 8-5-12 DrawFTG-Con, DrawFTG-Plt ................ 8-5-13 DrawGraph ....................8-5-13 DrawR-Con, DrawR-Plt .................

  • Page 15

    8-5-2 Command Reference The following are conventions that are used in this section when describing the various commands. Boldface Text ....Actual commands and other items that always must be input are shown in boldface. {Curly Brackets} ... Curly brackets are used to enclose a number of items, one of which must be selected when using a command.

  • Page 16

    8-5-3 Command Reference ^ ^ (Output Command) Function: Displays an intermediate result during program execution. Description: • This command momentarily interrupts program execution and displays alpha character text or the result of the calculation immediately before the command. • The output command should be used at locations where you would normally press the w key during a manual calculation.

  • Page 17

    8-5-4 Command Reference k Program Commands (COM) If~Then~(Else~)IfEnd Function: The Then-statement is executed only when the If-condition is true (non-zero). The Else-statement is executed when the If-condition is false (0). The IfEnd- statement is always executed following either the Then-statement or Else-statement. Syntax: <condition>...

  • Page 18

    8-5-5 Command Reference Description: • The default step value is 1. • Making the starting value less than the ending value and specifying a positive step value causes the control variable to be incremented with each execution. Making the starting value greater than the ending value and specifying a negative step value causes the control variable to be decremented with each execution.

  • Page 19

    8-5-6 Command Reference While~WhileEnd Function: This command repeats specific commands as long as its condition is true (non- zero). Syntax: While <condition> <statement> WhileEnd numeric expression Parameters: expression Description: • This command repeats the commands contained in the loop as long as its condition is true (non-zero).

  • Page 20

    8-5-7 Command Reference Prog Function: This command specifies execution of another program as a subroutine. In the MAT Mode, this command executes a new program. • Syntax: Prog ”file name” Example: Prog ”ABC” Description: • Even when this command is located inside of a loop, its execution immediately breaks the loop and launches the subroutine.

  • Page 21

    8-5-8 Command Reference Return Function: This command returns from a subroutine. Syntax: Return Description: Execution of the Return command inside a main routine causes execution of the program to stop. Execution of the Return command within a subroutine terminates the subroutine and returns to the program from which the subroutine was jumped to.

  • Page 22

    8-5-9 Command Reference k Jump Commands (JUMP) Function: This command is a count jump that decrements the value of a control variable by 1, and then jumps if the current value of the variable is zero. Syntax: Variable Value G G G G G Dsz <variable name>...

  • Page 23

    8-5-10 Command Reference Goto~Lbl Function: This command performs an unconditional jump to a specified location. Syntax: Goto <label name> ~ Lbl <label name> Parameters: label name: value (0 to 9), variable (A to Z, , θ ) Description: • This command consists of two parts: Goto n (where n is a parameter as described above) and Lbl n (where n is the parameter referenced by Goto n).

  • Page 24

    8-5-11 Command Reference Function: This command is a count jump that increments the value of a control variable by 1, and then jumps if the current value of the variable is zero. Syntax: Variable Value G G G G G Isz <variable name>...

  • Page 25

    8-5-12 Command Reference ClrText Function: This command clears the text screen. Syntax: ClrText Description: This command clears text from the screen during program execution. ClrMat Function: This command deletes matrix data. Syntax: ClrMat <matrix name> ClrMat Parameters: matrix name: A to Z, Ans Description: This command deletes the data in the matrix specified by “matrix name”.

  • Page 26

    8-5-13 Command Reference DrawFTG-Con, DrawFTG-Plt No parameters Function: This command uses values in a generated table to graph a function. Description: • This command draws a function graph in accordance with current conditions. • DrawFTG-Con produces a connect type graph, while DrawFTG-Plt produces a plot type graph.

  • Page 27

    8-5-14 Command Reference DrawRΣ-Con, DrawRΣ-Plt No parameters Function: These commands use values in a generated table to graph a recursion expression with Σ (Σ or Σ ) as the vertical axis and as the horizontal axis. Description: • These commands graph recursion expressions in accordance with current conditions, with Σ...

  • Page 28

    8-5-15 Command Reference k Input/Output Commands (I/O) Getkey Function: This command returns the code that corresponds to the last key pressed. Syntax: Getkey Description: • This command returns the code that corresponds to the last key pressed. • A value of zero is returned if no key was pressed previous to executing this command. •...

  • Page 29

    (1, 7) → ← (21, 7) Example: Cls_ Locate 7, 1, ”CASIO FX” This program displays the text “CASIO FX” in the center of the screen. • In some cases, the ClrText command should be executed before running the above program. 19990401...

  • Page 30

    8-5-17 Command Reference Receive ( / Send ( Function: This command receives data from and sends data to a connected device. Syntax: Receive (<data>) / Send (<data>) Description: • This command receives data from and sends data to a connected device. •...

  • Page 31

    8-5-18 Command Reference k Conditional Jump Relational Operators (REL) , >, <, ≥, ≤ G G G G G Function: These relational operators are used in combination with the conditional jump command. Syntax: <left side> <relational operator> <right side> Parameters: left side/right side: variable (A to Z, , θ...

  • Page 32: Using Calculator Functions In Programs

    You can include text in a program by simply enclosing it between double quotation marks. Such text appears on the display during program execution, which means you can add labels to input prompts and results. Program Display ”CASIO” CASIO ? → X ”X =” ? → X X = ? •...

  • Page 33

    8-6-2 Using Calculator Functions in Programs u To calculate a scalar product (` ` ` Row) ○ ○ ○ ○ ○ Example 2 To calculate the scalar product of Row 2 of the matrix in Example 1, multiplying by 4 The following is the syntax to use for this program.

  • Page 34

    8-6-3 Using Calculator Functions in Programs u To add two rows (Row+) ○ ○ ○ ○ ○ Example 4 To add Row 2 to Row 3 of the matrix in Example 1 The following is the syntax to use for this program. Row+ A, 2, 3_ Rows to be added Row for which scalar product is to be calculated.

  • Page 35

    8-6-4 Using Calculator Functions in Programs u Syntax of other graphing functions • V-Window View Window <Xmin>, <Xmax>, <Xscale>, <Ymin>, <Ymax>, <Yscale>, <T θ min>, <T θ max>, <T θ pitch> StoV-Win <area of V-Win> ....area: 1 to 6 RclV-Win <area of V-Win>...

  • Page 36

    8-6-5 Using Calculator Functions in Programs k k k k k Using Dynamic Graph Functions in a Program Using Dynamic Graph functions in a program makes it possible to perform repeat Dynamic Graph operations. The following shows how to specify the Dynamic Graph range inside a program.

  • Page 37

    8-6-6 Using Calculator Functions in Programs k k k k k Using Table & Graph Functions in a Program Table & Graph functions in a program can generate numeric tables and perform graphing operations. The following shows various types of syntax you need to use when programming with Table &...

  • Page 38

    8-6-7 Using Calculator Functions in Programs k k k k k Using Recursion Table & Graph Functions in a Program Incorporating Recursion Table & Graph functions in a program lets you generate numeric tables and perform graphing operations. The following shows various types of syntax you need to use when programming with Recursion Table &...

  • Page 39

    8-6-8 Using Calculator Functions in Programs Example Program View Window 0, 1, 1, –0.2, 1, 1_ 63gc Type_ ”–3 ” → 0 → R Start_ J62cb 6 → R End_ 0.01 → 0.01 → Start_ !J662fb 2fci DispR-Tbl^ 63bd DrawWeb , 30 Executing this program produces the results shown here.

  • Page 40

    8-6-9 Using Calculator Functions in Programs k k k k k Using Solve Calculation Function in a Program The following is the syntax for using the Solve function in a program. Solve( f(x), n, a, b) Upper limit Lower limit Initial estimated value Example Program Solve( 2X...

  • Page 41

    8-6-10 Using Calculator Functions in Programs The graph conditions that are required depends on the graph type. See “Changing Graph Parameters” (page 6-1-2). • The following is a typical graph condition specification for a scatter diagram or Line graph. S-Gph1 DrawOn, Scatter, List 1, List 2, 1, Square _ In the case of an line graph, replace “Scatter”...

  • Page 42: Performing Statistical Calculations

    8-6-11 Using Calculator Functions in Programs • The following is a typical graph condition specification for a sinusoidal regression graph. S-Gph1 DrawOn, Sinusoidal, List 1, List 2 _ • The following is a typical graph condition specification for a logistic regression graph. S-Gph1 DrawOn, Logistic, List 1, List 2 _ u35bbi Example Program...

  • Page 43

    8-6-12 Using Calculator Functions in Programs • Paired-variable statistical calculation 2-Variable List 1, List 2, List 3 Frequency data (Frequency) y -axis data (YList) x -axis data (XList) • Regression statistical calculation LinearReg List 1, List 2, List 3 Calculation Frequency data (Frequency) type* -axis data (YList)

  • Page 44: Program Mode Command List

    8-7-1 Program Mode Command List 8-7 Program Mode Command List RUN Program [OPTN] key GRPH SelOn G_SelOn_ PROB Level 1 Level 2 Level 3 Command Level 1 Level 2 Level 3 Command SelOff G_SelOff_ Swap Swap_ TYPE Y=TYPE LIST List List_ *Row *Row_...

  • Page 45

    8-7-2 Program Mode Command List [VARS] key [CTRL][F3](SET UP) key [SHIFT][VARS](PRGM) key Level 1 Level 2 Level 3 Command Level 1 Level 2 Level 3 Command Level 1 Level 2 Level 3 Command V-WIN Xmin Xmin Prog Prog_ ANGL Xmax Xmax JUMP Lbl_...

  • Page 46

    8-7-3 Program Mode Command List BASE Program [SHIFT][OPTN](V-Window)key [CTRL][F3](SETUP) key Level 2 Level 3 Command Level 1 Level 1 Level 2 Level 3 Command Level 1 Level 2 Level 3 Command V-Win ViewWindow_ StoV-Win_ RclV-Win_ Neg_ Not_ xnor xnor DISP [SHIFT][VARS](PRGM) key Level 1 Level 2...

  • Page 47: Program Library

    8-8-1 Program Library 8-8 Program Library • Be sure to check how many bytes of unused memory is remaining before attempting to perform any programming. Program Name Prime Factorization Description This program continually divides a natural number by factors until all its prime factors are produced.

  • Page 48

    8-8-2 Program Library egcw 19990401...

  • Page 49

    8-8-3 Program Library Program Name Arithmetic-Geometric Sequence Differentiation Description After input sequence terms 1, 2, and 3, this program determines whether it is an arithmetic sequence or geometric sequence based on the differences and ratios of the terms. Purpose This program determines whether a specific sequence is an arithmetic sequence or geometric sequence.

  • Page 50

    8-8-4 Program Library Example 1 Example 2 19990401...

  • Page 51

    8-8-5 Program Library Program Name Ellipse Description This program displays a number table of the following values based on input of the foci of an ellipse, the sum of the distance between the loci and foci, and the pitch (step size) of X. Y1: Coordinate values of upper half of ellipse Y2: Coordinate values of lower half of ellipse Y3: Distances between right focus and loci...

  • Page 52

    8-8-6 Program Library 19990401...

  • Page 53

    8-8-7 Program Library Program Name Rotation Description This program draws an angle at the coordinate defined by an input vertex, and then rotates it to a specified angle around the vertex. Purpose This program demonstrates coordinate transformation using a matrix. Important! Deg must be set as the angle unit for this program.

  • Page 54

    8-8-8 Program Library fcde fcde wfcde wfcde 19990401...

  • Page 55

    8-8-9 Program Library Program Name Interior Angles and Surface Area of a Triangle Description This program calculates the interior angles and surface area of a triangle defined by input coordinates for angles A, B, and C. Purpose This program calculates the interior angles and surface area of a triangle defined by coordinates for angles A, B, and C.

  • Page 56

    8-8-10 Program Library awaw bwaw aw9d 19990401...

Comments to this Manuals

Symbols: 0
Latest comments: