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 #210 background imageLoading...
Page #210 background image
Chapter
10
I
BASIC
Keywords
LO
C/C
ommunic at ions
Function
LOC
(buffer)
Returns the number of characters in the input queue if that
number is
255
or
less.
If the queue contains
256
or more characters, the LOG function
returns the number
255.
Since a string is limited to
255
charac-
ters, this limit eliminates the need for testing string size before
reading data into the queue.
Buffer
is the number assigned
to
the file when you opened it.
The default size
for
the input queue is
256
characters, but you
can change the size by using the
/C:
option when loading BASIC.
Ex
ample
10
X=LOC<I)
20
If
X>0
THEN
A$=INPUT$(LOC(l),#I)
Line
18
checks
to
see if there are any characters in the input
queue and stores the number
of
characters in the variable
X.
Line
20
tests the value
of
X.
If
X
is greater than
0,
there are
characters in the input queue, and Line
28
returns the charac-
ters in the buffer into A$.
Notice from the example that INPUT$ is preferred over LINE
INPUT#
or
INPUT# when reading communications files. This
preference is because all ASCII characters might be significant
in communications. INPUT$ allows all characters to be read.
The other statements do not. LINE INPUT# stops at a carriage
return. INPUT# stops at a comma
or
a carriage return.
208

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