
The final option is ‘Show function’. The program this runs is a little more complex than the ones shown so far
and illustrates a useful technique.
The line:
'((X+2)^3+4)/(X-2)' F1(X):
stores the expression
(
x
+
2
)
3
+
4
into the function
F1(X)
.
(
x
−
2
)
Notice the way the function is in single quotes so that the algebraic expression itself is used rather than its
value when evaluated using the current contents of memory X. If you wanted to graph this function by setting
1:
the post execution view number to 1 (the
PLOT
view), then you would need to include the command
CHECK
in order to
it or it would not graph. You may wish to edit the
.MSG.SV
and
.MSG.FN
program to
try this.
The next lines display the expression using the four options available.
The line:
GROB G1;F1(QUOTE(X));0:
converts the expression
F1(X)
into a Graphic Object (GROB). The number at the end, which changes with
each repetition, controls the font used to display the function.
The line:
DISPLAY G1:
displays this GROB on the screen, and then
FREEZE
freezes the display until a key is pressed.
266