EasyManua.ls Logo

HP HP-28S - Interactive Programs; Asking for Input

HP HP-28S
341 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
27
Interactive
Programs
Some
programs
require
direction
from
the
user-that
is, from you
when
you're
running
the
program.
When
the
user
must
supply
values
for variables, a
program
can
ask for
input.
When
the
user
must
choose
among
several alternatives, a
program
can
ask for a choice.
This
chapter
demonstrates
how
a
program
can
ask for
input
or
a
choice,
using
the
following
commands
from
the
PROGRAM
CON-
TROL
menu.
Command
Description
HALT
Suspend
program
execution.
s WAIT
Suspend
program
execution for s seconds.
KEY
Return
a
key
string if a key was pressed.
f s BEEP
Sound
a
tone
of
frequency f for s seconds.
CLLCD
Clear
the
display.
n DISP Display
an
object in
line
n of
the
display.
CLMF Restore
the
normal
display
when
the
program
completes
execution.
Asking
for
Input
The
following
sequence
creates a
custom
input
menu
for variables
A,
B,
and
C
sounds
a tone to alert
the
user,
and
halts for
input.
...
-::
STO
ABC
::-
t'1HW
44~]
,1
BEEP
HALT
...
234
27:
Interactive
Programs
I

Table of Contents

Other manuals for HP HP-28S

Related product manuals