The next option in the menu is ‘Input value’. Choosing this option will create an input screen. The statement
controlling this was:
INPUT N; "MY TITLE"; "Please enter N.."; "Do as you're told."; 20:
Examine the snapshot on the right and notice the connection between
the various parts of the
INPUT
statement and their effect. Note the
suggested value of 20, and note also that the prompt of “Please enter
N..” was too long to be displayed. See the
PROMPT
command for an
alternative that is simpler but less flexible.
When you enter a number into the input screen and press
ENTER
, the next line in
.MSG.IN
will display this
value in a
MSGBOX
. When you then press
, the view number of 7 specified in the relevant line of
.MSG.SV
will cause the
VIEWS
menu to be displayed again.
Notice that the input window is still displaying in the background. To stop this happening, you could have
included in
.MSG.IN
a line of
ERASE:
, which is a command to erase the display screen. Try editing the
program, inserting this line before the
MSGBOX
line, and running it again.
The option of ‘Message 2’ displays the same message as we saw
before, but presented in a different way. The
DISP
command divides
the display screen up into 7 lines (1 - 7) on which you can display data.
For example, suppose memory A contained 3.56, then the command:
DISP 3; "The value of A is: " A:
would display the message
The value of A is: 3.56
on line 3 of the
display screen.
Notice also that this time when you press
ENTER
, you end up in the
HOME
view rather than in the
VIEWS
menu again. This is not an error. If you look at the line in
.MSG.SV
controlling this option of the menu you
will see that its post execution view number was 0 (
HOME
) rather than 7 (
VIEWS
menu) like most of the
others. To see the
VIEWS
menu again, press
VIEWS
.
265