Alpha (String Data); Skip (Blank); Literals In Format Strings - Commodore CBM Printer 4022 User Manual

Hide thumbs Also See for CBM Printer 4022:
Table of Contents

Advertisement

Alpha
(String Data):
The
letter
A
represents
one
position
of
an
alpiia
field.
Within the
field,
leading blanks are
truncated, the
field
is
left-justified,
and
it
is
padded
to
the
right
with blanks. Shifted blanks,
CHR$(160),
are not deleted
if
in
the leading
positions.
Example:
PRINT#1,"A
AA AAA"
PRINT#2,
"CBM" CHR$(29)"CBM" CHR$(29)"CBM"
Results:
C
CE
CBM
Skip
(Biani():
Simply use
blanks
where
spaces
are required:
Example:
PRINT#1,"AAA
AAA
AAA"
PRINT#2,"PET"
CHR$[29) "PET"CHR$(29)
"PET"
Results
in:
PET PET
PET
To
right justify integers,
define
an alpha
string
the length
of
the longest
integer.
Then
blank
fill
the
left
of
the
integer
data
string
and
right justify
the
number
within
that
string.
Literals
in
Format
Strings
Literals
are characters
that are to
be
printed exactly as
they
exist
in
the
printer's
memory,
rather
than being
used
to
format other
data. Literals
are flagged
by preceding each
literal in
the
format
string
with a reverse
field
on
character.
One
use
of
literals
is
to
create a special
form
at
the
same
time
you
are printing
data.
This
is
done
by
using the
special
graphics characters
to
form
vertical,
horizontal, or
other
lines
between
the
fields.
You
can
create a
form
while
printing data, either
by
overprinting
graphic characters
or
by
inserting
literal
characters
in
a
format
string
as
shown
below.
-26

Advertisement

Table of Contents
loading

Table of Contents