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 #209 background imageLoading...
Page #209 background image
Chapter
10
I
BASIC Ke.ywords
LOC
Function
LOC(buffer)
Returns the current record position within a file.
Buffer
is the number assigned to the file when you opened it.
You use
LOC
to determine the current record position, that is,
the number
of
the last record processed since you opened the file.
When used with direct access files,
LOC
returns the record
number accessed by the last GET or PUT statement.
When used with sequential files,
LOC
returns the number
of
128-byte blocks that have been read or written.
Example
IF LOC(1)>55 THEN END
Program execution ends, if the current record position is greater
than
55.
Sample Program
1310
CIS
=
"WILLICIM
WILSON"
1320 GET 1
1330 IF N$
=
A$
THEN PRINT "FOUND IN RECORD"
LOCCI):
CLOSE: END
1340 GOT0 1320
This is a
portion
of
a direct access program. Elsewhere the file
has been opened and fielded.
N$
is
a
field variable. If
N$
matches
A$,
the record number in which it was found is printed.
207

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