Sharp MZ-80A Owner's Manual page 31

Hide thumbs Also See for MZ-80A:
Table of Contents

Advertisement

21
|
Further Study of
Comma
and Semicolon
For
review,
the following
example is taken
again.
The
following
is
replaced
for line
number 40...
10
A =
3
20 B
=
5
40
ptfiNrA
41
pRitfTB
42 PRIVTC
You remember this, don't you? In other words, when
using
commas
between
A,
B and C, a numeral is displayed 10
character space
away. Generate a program
with
new
state¬
ments
inserted,
and
run it.
Statements
to
be inserted
are
the
following:
I
This space
before the number is
for
the plus or minus sign.
30 C = A
+
B
40
PRINT
A, B,
C
50 END
3
5
8
K
O
*
*
<>
:
10 character space
8
or
minus
32 D= B t
A
Eÿ=
34
E = B
*
A
36 F
=
B
/
A
45
PRINT
D.E.F
RUN
3
5
8
125
15
1.6666667
With the comma
(
,
)
revised
to
semicolon
(
;
)
for line numbers, 40 and 45,
run
the program
once more. To
modify
the program,
type
in LIST and use the cursor in as
smart
a manner as
possible.
RUN
3
5
125
15 1.6666667
Semicolon ( : ) has
a
function that combines the characters
or
symbols
on
display together. Add semicolon (
; )
to
the end
of line number 40 then RUN,
in
order
to
make sure of this fact.
40
PTINT
A: B;C;
RUN
3
5
8
125
15
1.6666667

Advertisement

Table of Contents
loading

Table of Contents