EasyManua.ls Logo

Sharp PC-1500 - Page 33

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
It
is also possible to
print
the result
of
an ·
exp
ression which
is
contained
in
the
PRINT
state
·
ment. The following
one
·line program illustrates th
is:
Program Listing:
10 PRINT (1982 -
195
6)*365.25
Keystrokes:
m
oo
m
mmrucocr
1
rn
m
rnm
Brn
rn
13..Jm
L D
L*1
comm
o
:1Jffil
••TE•
I
As
you might
expect
,
the
result, a
nu
mber, is right just
ifi
ed
.
For the
sake
of
efficiency, it
is
best
to
avoid computing
ex
pressions within PRINT statements
un
l
ess
th4:1t
staten1ent
(and
its
associated
expression}
will
be
executed only one ti
me
in
a
program.
Because most programs
comput~?
scvcr
zil
res
ult
s at once, the printing
of
several items simultane·
ously
is
a common practi
ce
.
P
er
haps
the
simpl
est
of
the
mu
lt
iple·item
PRINT
statements d
iv
ides the d isplay window
into
two
se
ction
s.
Each section contai
ns
one of
t\'Vo
items specified in the print list. T
he
ite
ms
are
separated in
the
list
by
a comma. Explore
th
is
format
using
the
following program:
Progr
am
Li
sting:
10 A ; 2 * PI
20
P
RINT
"2
TI
MES
Pl
=
",
A
Ke
ystrokes:
CD L
0'.J
rn
d
il
~
1 *
-:
I PJ w ,
,.,..
1
mm
m
mwl!Drn
1s""'1
c:::i
rnr
...
,.,
mm
oooorn
1 ... "'
mrnc
= 1
I SHtfri
c:JI
SHlfr
lGJCAJ
IE
HTE1t
l
Run
the
program. As in the
si
ngle·itern PR INT statements, numbers are
ri
g
ht
justified and
characters are
left justified . In
th
is
e<1se,
the
fi
ustification (alignment) occurs
wit
hin each of the
two
sections
of
the display.
Using
your
edit
ing skills, alter line
20
to read:
PRINT A,
"=
2 TIMES
Pl"
Although
there
are several ways
to
accomplish
th
is
editing,
one
set
of
keystrokes could be:
!!!!!!9
IT.J
D.:J
IT.J
CEJ
CEl I
•"
"'
!I
1•s
ll
s•
1F
T I
11
•s
) CA]
I
SH
I
FT
I
GJ
CEJ
I
SHIH
I
@])
I = I
CEJ CEJ
CEl
CEJ CEJ
CEJ
CEl
CEl
CEJ
CEl
I $HlllT J [
C?_ft,
J
CEl
I
~t
ll(T
I (
DE
L)! SHIFT ! I
DEL
f
!E
MT
I!~
)
31
Do
not sale this PDF
!!!

Table of Contents

Other manuals for Sharp PC-1500

Related product manuals