Page 21-37
Store the program back into variable p by using
„@@@p@@@
. Next, run the
program by pressing @@@p@@@. Enter values of V = 0.01_m^3, T = 300_K, and n =
0.8_mol, when prompted. Before pressing ` for input, the stack will look like
this:
After execution of the program, the stack will look like this:
Using a message box
A message box is a fancier way to present output from a program. The
message box command in the calculator is obtained by using
„°L@)@OUT@ @MSGBO@. The message box command requires that the output
string to be placed in the box be available in stack level 1. To see the
operation of the MSGBOX command try the following exercise:
‚Õ~‚t~„ê1.2
‚Ý ~„r~„a~„d
„°L@)@OUT@ @MSGBO@
In summary: The common thread in the three examples shown here is the
use of tags to identify input and output variables. If we use an input string to
get our input values, those values are already pre-tagged and can be easily
recall into the stack for output. Use of the →TAG command allows us to
identify the output from a program.