
11-8 Applications
The program below lets you store the values for the current Window variables,
and it lets you display a graph using previously stored values. It also
demonstrates a method for including menus in a program.
PROGRAM:WINMEM
:CLRHOME
:DISP "WINDOW MEMORY"
:DISP "1:STORE WINDOW"
:DISP "2:RECALL WINDOW"
:DISP "3:QUIT"
:DISP " "
:DISP "ENTER 1,2, OR 3"
:INPUT M
Present menu of
choices.
:IF M=1
:GOTO S
:IF M=2
:GOTO R
:GOTO Q
Evaluate menu
selection.
:LBL S
:XMIN→A
:XMAX→B
:XSCL→C
:YMIN→D
:YMAX→E
:YSCL→F
:DISP "WINDOW STORED"
:GOTO Q
Store current graph
Window variable values.
:LBL R
:A→XMIN
:B→XMAX
:C→XSCL
:D→YMIN
:E→YMAX
:F→YSCL
:DISPGRAPH
Display graph with
previously stored
v
ariable values.
:GOTO Q
:LBL Q
:STOP
Quit program.
Program: Window Variables Store and RecallProgram