Radio Shack TRS-80 User Manual page 63

Micro computer system
Hide thumbs Also See for TRS-80:
Table of Contents

Advertisement

Chapter
12
From
>to
TAB
After those
last
lessons
let's
take
an easy
one.
We
already
know
3
ways
to set
up
our output
PRINT
format.
We
can:
1.
Enclose
what
we
want
to
say
in
quotes,
inserting
blank
spaces
as
necessary.
2.
Separate the
objects of the
PRINT
statement with semicolons
so
as
to
print
them
tight-
ly
together
on
the
same
line.
3.
Separate the
objects of the
PRINT
statement with
commas
to print
them
on
the
same
line
in
the four
different print
"zones."
A
fourth
way
is
to use
the
TAB
function,
which
is
similar
to the
TAB
on
a
regular type-
writer.
It
is
especially useful
when
the
output
is
columns
of
numbers
with
headings.
Type
in
the following
program and
RUN:
10
PRINT
TAB
(
5
)
;
"
THE
"
;
TAB
(
20
)
;
"
TOTAL
"
5
TAB
(
35
)
;
"
SPENT
"
20
PRINT TAB(5)
;
"BUDGET"
;
TAB< 20)
;
"YEAR'S"
;
TAB
(
35
)
;
"THIS"
30
PRINT TAB
C
5
)
;
"CATEGORY
"
;TAB( 20
)
;
"BUDGET
"
s
TABC
35
)
;
"MONTH
The
RUN
should appear:
THE
TOTAL
SPENT
BUDGET
YEAR'S
THI
S
CATEGORY
BUDGET
MONTH
EXERCISE
12-1
:
Write a
program
using the three
PRINT
forms below:
1.
PRINT"
2.
PRINT"
and
3.
PRINT
TAB
(
);
"
";TAB(
);"
";TAB(
);"
to
set
up
the headings given
in
the
prior
example. Use form
1 for
the
first
line
of the head-
ing,
form
2
for
the second
line
and form
3
(the
TAB
form)
for
the third
line.
"YOUR
TAB.
HI

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents