
DISP <line number>;<expression>
This command breaks the display up into 7 lines and
allows output to them.
Using the
DISP
command on a line wipes that entire
line to the right hand end of the screen before display.
This means that it is not possible to write over an existing line and ‘edit’
material already present. The
DISPXY
command should be used for
this purpose but is a little more complex to use.
DISPXY <xpos>;<ypos>;<font>;<expression>
This command displays the text/object/result contained in <expression> at the screen position specified using
the font specified. An extensive example can be found in the chapter “Programming the hp 39g & hp 40gs”
on page 274.
The xpos and ypos values are positions which are relative to the values of
Xmin
,
Xmax
,
Ymin
&
Ymax
as set in the
PLOT SETUP
view. The font
number can be either 1 (small) or 2 (large). For example, the program
shown left will produce the result shown below right if the axes are set to
the default values of -6.5 to 6.5 and -3.1 to 3.2.
The xpos and ypos values refer to the top left corner of the text when
displayed. The clipping rules are a bit complicated, probably due to the
fact that the command was done in a bit of a hurry (in a hotel room late
one night in Chicago after I’d pleaded with the programmers!).
If the xpos, ypos corner is off the top of the screen or off the left edge of
the screen then the string will not be displayed even if part of it is
onscreen. If there is sufficient room vertically for the string but part of it
would display off the right edge of the screen then it will be partially
displayed (see right). On the other hand, if we were to move the text
one more pixel downwards so that it would display partially off the
bottom of the screen then it will not display at all. The best way to
satisfy yourself of this is to experiment.
Finally, the value of <expression> can include variables of any kind and can mix text and variables. For
example you could have a command:
DISPXY -6.5;0;1;"After "N" min the list is "L0:
295