The Input Statement - Sharp PC-1500 Instruction Manual

Hide thumbs Also See for PC-1500:
Table of Contents

Advertisement

All
and more about Sharp
PC-1500 at
http:f/www.PC-1500.in fo
Kevsu
o
kcs:
OJ
rnmm
OLJcs.:::J re:::JtSHn! ("
OO(Q]
ISP.CC.
r
.....
1[:J
1
... n
!CJ@rco)
m
L
l!l
m
wonm m
1
••
,,.1
c:J
wm
ISP•CEI
[
~,,)CJ I
SMll'
T)c:J
IFHIC"I
rn
OOrP'l
rn
1
llJW
u"J l••"•I
CJ
CM)
(Tl
l•••<•I
'
'"'"
I
[:JI
SHIFT
I
CD
I
<•Ttol
m
Cl!.)
L.l'l
r
A
J []]
Q
j
CD
c
......
,
(:I
CDW
fSP<tcl
(sniJ
L:J
tSHnl
CD
f<•rc•I
m~
i:l'"11.IJf1Dmm
.....
•1c::imoom1
...
«
:
'*""')
c:J
!
SloFrl
~
it
N
Tfltl
moo
rim
c.
U J
m
ITT
1
.. ...
1c:::imm
1
SP•c•1
'
'
""'
I
C:::J
[smn
I
[_:
J l<•ir•I
m
ru
mmt
uJ
rnm ,
•• ,
,
.,
L~
1cn
rn1 •••c•1
(
IH
"
t
j("_]
('jK1
(
i)
m
i
(
NIClli
ODCFJ
ffiCAJO!JOCJ(I)t SHn!
)[DJ@)
(!M-
tJ
CJ
l
EHTEA
J
Notice what
happens after the
last '"note" is
printed; the
program ends
and
the
display
returns
lo
the
prompt.
This
happens because
there
are
no o ther statements
following the lasl
PAUS E.
To
"Freeze" the display
aft
er
the
last note is
printed,
we
can
change
line 80
to:
80
PRINT "D
O
"
Keystrokes:
8
i
00
'!..)
[
R
~
D.J
Oil
CD
1-
·1
~
Ll!J
[QJ
,
.,.,.
I CJ
(LHmrl
Alter all,
there'
s no reason why we
c;in't mix
PR INT and
PAUSE
statements thro u9t1o
ut
our
program. Try
this
fo
r
yourself.
H.
INPUT
By
utilizing
the various forms of the PRINT statement. alone o
r
in combination.
info
rmation
can be nicely presented
to
the
computer
user. Most of the items which will be
printed,
however,
are the
result o
f
processing some
in
itial
data,
This
initial data
is
given
to
the program
by
that
same
computer user.
The instruction
which
controls this
proc,
e
ss is the
INPUT
instruction.
In
its
simplest
form;
IN
PUT
variable-name, the
INPUT
instructio
n merely prin
ts
a
?
(question
mark) and then
waits for tho
user
to
type
in
the
required info
rmation.
What
is
"'requil'ed" depends
on the
variable which
appears as
part of the
IN
PUT instruction. Fo
r
example,
if
the variable is
numeric,
the
user
shou ld enter
a
number. w
hich w
il
l
b• stored
in
the
variable.
Do
you
see
a
problem with this fo rm
of the INPUT statement
?
Good
.
As
some of
you
may
realize, unless the user of the program i$ ;,ilio 11>e
programmer
(and probably
not
even then),
he
will
not
knov1
vvhat
type
of data to enter when he
secs
the question mark.
It is
up
to
the
programmer
to keep
the
user
info
rmed at
all time s.
35
Do
not sale this PDF!!!

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents