Debugging A Program; Calculating The Number Of Bytes Used By A Program - Casio FX-7400G PLUS User Manual

Hide thumbs Also See for FX-7400G PLUS:
Table of Contents

Advertisement

Chapter 8
Programming

3. 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 and that debug-
ging is required.
u u u u u To eliminate bugs that cause error messages
An error message, like the one shown below, appears whenever something illegal
occurs during program execution.
When such a message appears, press d or e to display the location where the
error was generated, along with the cursor. Check the "Error Message Table" for
P.200
steps you should take to correct the situation.
P.133
u u u u u To eliminate bugs that cause bad results
If your program produces results that are not what you normally expect, check the
P.135
contents of the program and make necessary changes. See "Editing Program Con-
tents" for details on how to change program contents.
4. Calculating the Number of Bytes Used
This unit comes with 20,000 bytes of memory. A byte is a unit of memory that can be
used for storage of data.
There are two types of commands: 1-byte commands and 2-byte commands.
While the cursor is located inside of a program, each press of d or e causes the
cursor to move one byte.
P.37
132
• Error messages appearing when the program is run
• Results that are not within your expectations
• Note that pressing d or e will not display the location of the error if the pro-
gram is password protected.
by a Program
• Examples of 1-byte commands: sin, cos, tan, log, (, ), A, B, C, 1, 2, etc.
• Examples of 2-byte commands: Lbl 1, Goto 2, etc.
• You can check how much memory has been used and how much remains at any
time by selecting the MEM icon in the Main Menu and entering the MEM Mode.
See "Memory Status (MEM)" for details.

Advertisement

Table of Contents
loading

Table of Contents