EasyManua.ls Logo

Sharp PC-1500 - Page 32

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...
All and more about Sharp PC-1500 at http
:/l
www.PC-1500.info
Enter the following program
to
demonstrate t
he
printing
of
single items. (Remember
to
issue
the
NEW
command before you begin.)
Program Listing:
10
ZS =
"I
S NOUGHT ..
20
zz
= 0
30
PR
INT ..
IN
CA
NADA,
TIS TH
OUGH
T"
40
PRINT
ZZ
5.6 PRINT Z$
Keystrokes:
OJ
W m 1 ...... 1 m : = I
!Bi:il
....:.J
CD
CD
1
...
c•
I
[][):OJ
[U
JI G I
uu
r 11 I
•or
T I
CJ
[
•••<A
l
w r01m
mc
=J
00
1
...,,.
1
CD
C!!
J
moo
co '"""'
'CJf
Jr
1
..
= .
f
SP•e<
'
C:OlD._
s
:J
(
..
c•I T J
(EJ
OL
lJ[)
[QJ
1 H .
LL..
{
~1n
j
C::J
IFHTEll I
rn
oo
m
oo
co
Wh
en
run, this pronra
rn
shou
ld
pr'
oduce three lines
of
output as follo\vs (pr
ess
(
tN
f L
1t
) a
ft
er
reading each line):
•••
••
IM
CAMAiiA
, TI:
:;
THOUGH
T
(
..
,
. I
~~1
.
•••
..
,.
Tho
fir
st of
our
PRINT statements (line 30) dis1>lays a character string
or
"literal". Notice
th
at
the
doub
le
quote
marks are
NOT
printed as pa
rt
of
tho outp
ut
. They arc necessary
to
"delimit
",
or
mark, the beginni
ng
or
end
of
th
e sequence
of
char
ac
ters which you wish to
pr
int. This
sequence can
include any character except the double
quote
charac
ter
itself.
The items in
the
second
and
third
PR
INT statements
(l
ines
40
and
50
1 should be recognizable
to all readers
as
va
riables. When a variable name is used within a
pr
int list, the
va
l
ue
of the variable
is
pr
inted. In
th
is case,
we
knew what the values
of
ZZ
and
ZS
would be since
lhey
were specified
by
lines 10 and
20.
Printing an
"empty"
variable will result in a zero
or
a blank depending
on
wh
eth
er the variable is numeric or character.
Clever readers
will
h
ave
observed that character strings and the values
of
character variables
are
pr
inted beginning on the
le
ft
si
de
of
the di
sp
lay.
Th
is
is
known as
"left
justifie<I".
By
contrast,
numbers
.;ind
the
va
lues
of
numeric
variables
are
"right justifi
ed
".
30
Do not sale this PDF !!!

Table of Contents

Other manuals for Sharp PC-1500

Related product manuals