EasyManua.ls Logo

Sharp PC-1500 - Wait

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
m
rn
m m m
oo
m 1
••
IF
1 c::J
ru
m m OD m 1
...
c.1
L£J w G
rn rn
w DLI 1
SHIFT
1
co
'
"'IF'
1
c::i
'
'""
"'
OOW
{E) fNJ
~
l
CNTCR
I
In
addition
to
counting up, the
STEP
clause
:a
lso
alloi.vs
SHARP
to
count
down
. This
is
done
by
reversing
the
initial and final values and specifying a negative increment_
The
following
program, (dedicated
to
consumers everywhere), illustrates
th
is:
The Coverup
Ca
rpet Emporium
is
offering r"
g'
to the LAO
INN
at
the
amazing, low price
of
S
.99
per square foot. The rug
.s
ran
ge
in r
ad
ius from
40
feet !for the hotel lobby) to 1
foot
!for the
bathroo
ms). Between each rug
and
the
next
smaller size is a
gap
of
three feet
in radius. Mr.
Crafty Consumer decides to price each rug using a
pr
ogram
on
h
is
SHARP
computer.
He
\vrites the follo\ving program:
10 FOR R =
40
TO 1 STEP - 3
20
P = .
99
*!P
l*
R " 2)
30
PRINT
R;"
FOOT MODEL IS
$";
P
40
NEXT R
50
END
an
d discovers that the rugs range
in
price
from
$4976
.2 to
$3
.1
1.
Q.
WAIT
Th
e WAIT
statement
allows
the
programmer to change the
ope
ration
of
the
p
ri
nt
stat
ement.
Informati
on
displayed
by
a PRI
NT
statement will remain
on
the display for the time period
specified
by
the WAIT statement,
Th
e form
at
for
the
WA
IT
statement
is
:
WAIT
ar
gument
The
ar
gument
is
optional. If no argument is specified, the default time per iod
is
"infinite
";
that i
s.
the
inform ation wi
ll
remain
on
the
disp
la
y unt
il
the user presses I
EN
TfAi . This is
the
mode
of
operation used in
most
of
our programs
to
this
point
.
If
an argumelll
is
given all subseque
nt
PRINT statements will "
hold"
their
informat
io
n
on
the
display for a
time
period proportional to
the
number
specified as an argument. Th
is
type
of
printing
is
s
im
il
ar
to
the PAUSE stateme
nt
, exce
pt
that
the
time period of
the
PAUSE statement
is
fixed. Notice
that
the
WAIT
statement
has no effect
on
the operation
of
the
PAUSE statement.
The number
(-or
exp
ressi
on
which results in a number) given as an
ar
gu
ment
must be in the
range
O to 65535.
WA
IT O causes infor
mation
to
be displayed so fast
that
it
is
v
ir
tually
unreadable. WAIT
65535
will cause each PR INT
sta
tem
ent
to
disPlay its information for about
17 minutes! More
practically.
WA
IT
64
gives a
pe
riod of
about
a second, and WAIT
3840about
a min
ute
,
To
reset
the
operation
of
the
PR INT statement, so that
it
waits until
the
user presses
enter,
use the instruc
tion
WAIT with
no
argument.
Demonstration
Prrogram
This program illustrates the effect of
the
WAIT
statement
on
subsequent PRINT statements.
Here we vary
the
WAIT
time
from 0 to 102
by
increm
ent
s
of
2 wh
il
e printing
tP
•r
iods in a loop.
The
BE
EP
is
so
lely
to
ai
d you in comprehend
ing
the
time interval, since some
of
the
action
happens
too
fast
to
be seen.
54
Do
not sale this PDF
!!!

Table of Contents

Other manuals for Sharp PC-1500

Related product manuals