Use Of Variables - Sharp EL-5230 Operation Manual

Programmable scientific calculator
Table of Contents

Advertisement

Use of variables

Global and local variables are treated differently in the PROG mode.
• The letters A – Z and θ, used on their own, represent global variables.
Global variables correspond to the memories of the calculator (e.g., 'C' in a
program means memory C of the calculator). Global variables allow your
programs to use values stored in memories, or to pass variables from one
program to another. Global variables also allow you to store results from
programs and use them in any mode.
• You can also name and use up to nine local variables (@ v). Local
variables retain values only in an individual program.
If a line in your program contains an equation
such as Y = M
X + 5, it sets the global variable
1
Y equal to (M
× X) + 5. On encountering this
1
equation while running the program, if the
value of the local variable M
defined earlier in the program, the calculator
prompts you with the display 'M
value for M
. The global variable X will already
1
be set to the value last stored in that memory.
With just a little practice you will soon become
proficient at typing programs into your calculator.
Example
Create a simple program that requests input of the base length (B
and height (H
creating, RUN the program to determine the area of a triangle with a
base of 4 units and a height of 3 units.
1.
Preparing to create a NEW program
Procedure
Enter the PROG mode.
Select NEW.
Select the NORMAL program mode.
Type the program name.
Enter the program name.
has not been
1
=?' to enter a
1
) of a triangle and then calculates the area (A). After
1
Key operations
b 2
1
0
AREA
e
Chapter 7: Programming
SLOPE :NORMAL
Y=M¡X+5
_
SLOPE :NORMAL
M¡=?
Display
AREA :NORMAL
PROGRAM?
)
1
77

Advertisement

Table of Contents
loading

This manual is also suitable for:

El-5250

Table of Contents