beautypg.com

0©(i®c©®0®(i®a0(lpi)b, A b « a+b, A b « a+b -a c – HP 49g Graphing Calculator User Manual

Page 196: 0000 « ^ a b « a+b -a c, A-b), Setting

Attention! The text in this document has been recognized automatically. To view the original document, you can use the "Original mode".

background image

The following program segment demonstrates how to set a local variable

to the result of a calculation, and to use the result in a subsequent

calculation. The program accepts two input arguments and uses these in

the calculations.

1. On the command line, insert the program delimiters and specify the

local variables to hold the input arguments.

Setting

a local variable to the result oF a calculation

« ^ A B

2. Start a new nested procedure and define the initial calculation.

« ^ A B
« A+B

»

»

3. Store the results of the calculation to local variable C.

« ^ A B
« A+B -A C

4. Open a new nested procedure and enter a calculation that uses the

result of the initial calculation.

0©(I®C©®0®(I®A0(lPi)B

0000

« ^ A B

« A+B -A C

« C+0

(A-B)

Page 10-10

Introduction to programming