Application Guide
- Handheld: Hold down the c key and press · repeatedly.
A message is displayed. To edit the program or function in the Program Editor,
select GoTo. The cursor appears at the command where the break occurred.
Getting Values into a Program
You can choose from several methods to supply the values that a function or program
uses in calculations.
Embedding the Values Within the Program or Function
This method is useful primarily for values that must be the same each time the
program or function is used.
1. Define the program.
Define calculatearea()=
Prgm
w:=3
h:=23.64
area:=w*h
EndPrgm
2. Run the program.
calculatearea() :area70.92
Letting the User Assign the Values to Variables
A program or function can refer to variables created beforehand. This method requires
users to remember the variable names and to assign values to them before using the
object.
1. Define the program.
Define calculatearea()=
Prgm
area:=w*h
EndPrgm
2. Supply the variables, and then run the program.
w:=3 : h:=23.64
calculatearea() :area70.92
Letting the User Supply the Values as Arguments
This method lets users pass one or more values as arguments within the expression
that calls the program or function.
The following program, volcyl, calculates the volume of a cylinder. It requires the user
to supply two values: height and radius of the cylinder.
Getting Started with the Program Editor 491