436 Using Variables
Updating a variable
If you want to update a variable with the result of a calculation, you
must store the result explicitly.
Reusing the last answer
Each instance of Calculator automatically stores the last calculated result
as a variable named Ans. You can use Ans to create a chain of
calculations.
Note: Do not link to Ans or any system variable. Doing so could prevent
the variable from being updated by the system. System variables include
statistics results (such as Stat.RegEqn, Stat.dfError, and Stat.Resid) and
Finance Solver variables (such as tvm.n, tvm.pmt, and tvm.fv).
As an example of using Ans, calculate the area of a garden plot that is 1.7
meters by 4.2 meters. Then use the area to calculate the yield per square
meter if the plot produces a total of 147 tomatoes.
1. Calculate the area:
– On the Calculator entry line, type
1.7*4.2, and press Enter.
– Handheld: On the Calculator entry line, type 1.7 r 4.2, and press
·.
2. Reuse the last answer to calculate the yield per square meter:
– Type
147/ans, and press Enter to find the yield.
– Handheld: Type 147 p ans, and press · to find the yield.
Entry Result Comment
a := 2
2
a
3
8 Result not stored in variable a.
a
2
a := a
3
8Variable a updated with result.
a
8
a
2
& a
64 Variable a updated with result.
a
64