BASIC Example:
10
0
REM
--
Vertical Cursor position Movement -
110
REM
-notice
'#'
has
been replaced
by
line number-
120
LPRINT
CHR$(27);"&a20R";"Line
20
- Twenty - Line
20
"
130
LPRINT
CHR$(27);"&a15R";"Line
15
- Fifteen - Line 15"
140
LPRINT
CHR$(27);"&a32R";"Line32-Thirty-Two-Line 32"
150
LPRINT
CHR$(27);"&a25R";"Line 25-Twenty-Five-Line 25"
160
REM
- this loop prints
data
in
lines
20
to
40
170
FOR
N=20
TO
40
180
LPRINT
CHR$(27);"&a";N;"R";
190
LPRINT
" line number
";N
200
NEXT
N
210
LPRINT
CHR$(12);
:REM
-Form
Feed-
HORIZONTAL
CURSOR
POSITIONING
(USING
DECIPOINTS)
The
following escape sequence moves the cursor horizontally in
1/720 inch increments (decipoints). This sequence ignores margins
and
can
therefore
be used
to
move the cursor
to
any
point along
the
present line (within
the
physical limits
of
the
printer).
Ec&a#H
# =Horizontal position (in decipoints)
The
value field
(#)
specifies the new horizontal position in
decipoints-
a plus
(+)
or
minus
(-)
sign before
the
decipoint value
specifies
that
the position is relative
to
the
current
active position
(+
moves cursor right; - moves cursor
left)-no
plus
or
minus sign
indicates
that
the
cursor
move
is
absolute, with
the
left-most
printable limit
of
the
page
being position zero. NOTE: LaserJet+
and
LaserJet
500+
printers allow you to specify fractional
decipoint values to two places
after
the decimal.
2-17