Page 21-34
Examples of tagged output
Example 1 – tagging output from function FUNCa
Let’s modify the function FUNCa, defined earlier, to produce a tagged output.
Use ‚ @FUNCa to recall the contents of FUNCa to the stack. The original
function program reads
« “Enter a: “ {“:a: “ {2 0} V } INPUT OBJ→→ a « ‘2*a^2+3‘
NUM »»
Modify it to read:
« “Enter a: “ {“:a: “ {2 0} V } INPUT OBJ→→ a « ‘2*a^2+3‘
NUM ”F” →TAG »»
Store the program back into FUNCa by using „ @FUNCa. Next, run the
program by pressing @FUNCa. Enter a value of 2 when prompted, and press
`. The result is now the tagged result F:11.
Example 2
– tagging input and output from function FUNCa
In this example we modify the program FUNCa so that the output includes not
only the evaluated function, but also a copy of the input with a tag.
Use ‚ @FUNCa to recall the contents of FUNCa to the stack:
« “Enter a: “ {“:a: “ {2 0} V } INPUT OBJ→→ a « ‘2*a^2+3‘
NUM ”F” →TAG »»
Modify it to read:
Note: For mathematical operations with tagged quantities, the calculator will
"detag" the quantity automatically before the operation. For example, the left-
hand side figure below shows two tagged quantities before and after pressing
the * key in RPN mode: