Programming Guide

20050401
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.
Example 2 To use the OCTA program (page 8-1-2) to create a program that
calculates the surface area (cm
2
) and volume (cm
3
) of regular
tetrahedrons when the length of one side is 7, 10, and 15 cm
Use TETRA as the file name.
The following are the formulas used for calculating surface area S
and volume V of a regular tetrahedron for which the length of one
side A is known.
Use the following key operations when inputting the program.
Length of One Side A .. !J(PRGM)4(?)aav(A)6(g)5(:)
Surface Area S ............ !x( )d*av(A)x6(g)5(^)
Volume V ..................... !x( )c/bc*av(A)Md
Compare this with the program for calculating the surface area and volume of a regular
octahedron.
Length of One Side A .. !J(PRGM)4(?)aav(A)6(g)5(:)
Surface Area S ............ c*!x( )d*av(A)x6(g)5(^)
Volume V ..................... !x( )c/d*av(A)Md
As you can see, you can produce the TETRA program by making the following changes in
the OCTA program.
•Deleting c * (underlined using a wavy line above)
•Changing d to b c (underlined using a solid line above)
A
8-3-2
Editing Program Contents
2
S = 3 A
2
,V = –––– A
3
12