EasyManua.ls Logo

Sharp PC-1500 - Page 39

Sharp PC-1500
169 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...
A
ll
and more about Sharp PC-1500
at
http://www.PC-1500.info
The
op
eration
of
pr
ompti
ng (printing a re
que
st
for
input)
is
so
common
t
hat
more
ad
vanced
forms
of
th
e INPUT
statement
have
been
created
wh
ic
h incorporate it. T
he
first
of
these is
\Vritten
\V
ith a s·
em
i
co
lon:
I
NPU
T
"cha
rac
ters"
; vari
able
.na
me
Astute r
eade
rs wi
ll
recognize o
ur
o
ld
frien
d!
the
char;ictcr
strin
g.
This string will
be
printed
on
the display a.s a
promp
t. The cursor, replacing
the
ques
tion
mar
k,
will
foll
ow
on
th
e same
li
ne,
and SHARP will wait
for
the
user's input. T
hi
s
fo
rm
of
th
e INPUT
stat
ement
al lows us
to
re.write
our
prev
io
us
exa
mp
le
as:
Program Listing:
10 A = O
20
IN
P
UT
" E
NT
ER ANY NUMBER
'"
A
.
30
AP
= A
*P
I
40 PR
IN
T
A;
" TIMES Pl
=
";
AP
Keystrokes:
m
rn
m 1=1
rn1
T••
I
rn
rn
coao
O!J 110
rn
1
....
r1
C'.'.'J
moo
rn
moo
t
•••••
I
f7iJ
mm
1
••
c•1
oo
ruJ
oo rn
mm,
,
.•••
,
f $HI
FT
I
c:J
I
SHIFT
}
CD
fA'Ji
t:HT[!ll
)
rn
r
~
1
AJ
mC==
-i r
Ai
mm
rn
,
••
,..
,
ru
rn
CDOD co [![)Cr.J m I
'"
"'
' CD l
5'UFT
I c:J j
sPAce
l
CTJ
C0
GiJ
(TI
[[)
l
s••«
I
(LJ
o:J
j
sPAct
l @ )
l•••c•I I
SHIH
!
c:J
I
SH"'
I
c:J
m
CD
l••n)
As you
run
t•his
ex
ample, notice
ho
w
the
use of the INPUT state
ment
d iffers from the
PA
USE
s
taterr,en
t.
The
second
prompting
input
form
is
alm
ost
ident
ical
to
t
he
first
ex
cept
that
it
uses a
comma
instead of a sem
ic::oton:
IN
PU
T
"c
haracters
",
variable·na
me
Wh
en
th
ls
form
of
th
e
stat
em
en
t
is
executed, the associated character stri
ng
is displayed and the
computer
ag
ain waits for input. This tim
e,
f1owever
, as the user begins
to
type, the prompt
me
sS<Jge
is
cle
ared
and
the
user's
data
ap
pe
ars in its place. This allows
data
entry
after
a
lon
g
pr
ompt
without
run
ni
ng
off
the end
of
th
e display.
Change
the
semicolon
to
a
com
ma in line
20
of
our program and re.
run
the p rogram.
Of course,
the
entry
of
data
is
n
ot
lim
it
ed
to
nu
mbers.
as
our
examples so far have implied,
To
enter
characters
we
merely spec
if
y a character vari
ab
le in the INPUT
statement
as in
th
is
brilliant,
deduct
ive pr
og
ram:
37
Do
not sale this PDF
!!!

Table of Contents

Other manuals for Sharp PC-1500

Related product manuals