Wait - Sharp PC-1500 Instruction Manual

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

Advertisement

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
rum m
OD
m
1
...
c.
1
L£J
w
G
rn
rn
w
DLI
1SHIFT1
co
'
"'IF'
1
c::i ''"""'
OOW
{E)
fNJ
~
l
CNTCR
I
In
addition to counting
up, the
STEP clause
:also
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
this:
The Coverup
Carpet Emporium
is
offering
r"
g' to the LAO
INN
at the amazing,
low
price
of
S.99
per
square foot.
The
rug.s
range in
radius
from 40 feet !fo
r
the hotel
lobby)
to
1
foot
!for
the bathrooms). 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 program
on
his
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
and
discovers
that the
rugs range
in
price
from
$4976.2
to
$3.1
1
.
Q.
WAIT
The WAIT statement allows
the
programmer
to change
the
operation of the
print
statement.
Information displayed by a
PRI
NT
statement
will
remain
on
the display
for the time period
specified
by
the
WAIT statement,
The
format
for the
WAIT statement is:
WAIT argument
The
argument
is
optional.
If
no argument is specified,
the
default time
per
iod
is
"infinite";
that
is.
the
inform
ation
will
remain
on
the display
until
the
user
presses
IENTfA
i
.
This is the
mode
of
operation
used in most
of o
ur
programs
to this
point.
If an argumelll is given all subsequent PRINT statements will
"
hold"
their
information
on the
display fo
r
a
time
period
proportional
to
the
number
specified
as
an
argumen
t.
This
type
of
printing
is
similar
to
the
PAUSE
statement,
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 expression
which results
in a number)
given as an argument
must
be in
the
range
O
to 65535.
WA IT
O
causes information
to be
displayed so fast that
it
is
virtually
unreadable.
WAIT
65535
will
cause each
PR
INT
statement to
disPlay its
information
for
about
17
minutes! More practically.
WAIT 64
gives
a
period
of
about a second,
and
WAIT
3840about
a
m inute, To
reset
the
operation
of
the PR INT statement, so that it waits
until
the
user
presses
enter, use
the instruction 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
increments
of
2
while
printing tP•riods
in
a
loop.
The
BE EP
is
solely
to
aid
you in
comprehend
ing
the
time
interval,
since
some of
the
action
happens
too fast
to
be
seen.
54
Do not sale this PDF
!!!

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents