
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
Commentaires sur ces manuels