EasyManuals Logo

Tandy 1000 Basic Reference Manual

Default Icon
411 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
Page #215 background imageLoading...
Page #215 background image
Chapter
10
I
BASIC Keywords
LPOS
Function
LPOS(num
ber)
Returns the logical position
of
the print head within the printer’s
buffer.
Number
can be 0
or
1
to indicate LPT1:.
LPOS is only useful
for
checking the position
of
the print head
after a LPRINT statement that is terminated by
a
semicolon to
suppress the automatic carriage return. The statement contain-
ing LPOS is not executed until the LPRINT statement is fin-
ished printing.
LPOS does not necessarily give the physical position
of
the print
head if the printed string contains the ASCII code
for
a carriage
return.
For
example, if you
are
printing a string
of
20 characters
and the 10th character is the ASCII code
for
a carriage return,
the printer advances to the next line after printing the ninth
character before printing the remaining 10 characters. If the
string is terminated by a semicolon to supress the automatic line
feed, the physical location
of
the print head is at position 10, but
LPOS returns
a
value
of
21 because that is the logical location
of
the print head.
Example
You may want
to
use LPOS
to
determine whether there is
enough room to continue printing more variables on the same
line.
100
IF
LPOS(X)>60 THEN LPRINT
If the printer has printed more than 60 characters, a carriage
return is sent
so
that the printer skips
to
the next line.
213

Table of Contents

Other manuals for Tandy 1000

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Tandy 1000 and is the answer not in the manual?

Tandy 1000 Specifications

General IconGeneral
ProcessorIntel 8088
Processor Speed4.77 MHz
RAM128 KB (expandable to 640 KB)
Operating SystemMS-DOS 2.11
ManufacturerTandy Corporation
Release Year1984
StorageSingle or double 5.25" floppy disk drive (360 KB), optional hard drive
SoundTandy 3-voice sound
PortsParallel, Serial
GraphicsCGA (Color Graphics Adapter)
Graphics Modes320x200, 640x200

Related product manuals