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 #72 background imageLoading...
Page #72 background image
Chapter
71
Disk
Files
2. To enter new data
to
the file, follow the same procedure as for
entering data in the Output mode.
The following program illustrates this technique. It builds
upon the file previously created.
Note:
Read through the entire program first.
If
you
encounter BASIC keywords that are unfamiliar
to
you,
refer
to
Chapter
10
for their definitions.
Sample Program
10 OPEN
"A",
1,
"115t.dat"
20 LINE INPUT "TYPE
A
NEW NAME
OR
PRESS <N>
";
N$
30 IF N$
=
"N" THEN 60
40 WRITE# 1, N$
50 GOTO 20
60 CLOSE 1
If
you want the program
to
print on your display the informa-
tion stored in the updated file, add the following lines:
70 OPEN
"li5t.dat"
FOR INPUT AS 1
80 IF EOFCI) THEN 200
90 INPUT#
1,
N$
100 PRINT N$
110 GOTO 80
200 CLOSE 1
After you have run this program, save it. For example, type
SAVE "payroll2.bas"
to
save the program under a different
name than the previous program.
Direct Access Files
With a direct access file, you can access data anywhere within
the file.
It
is
not necessary
to
read through all the information,
as with a sequential access file, because in a direct access file
you can access each record of information individually by its
number.
More program steps are required
to
create and access direct ac-
cess files, but they are more flexible and easier
to
update than
sequential access files.
70

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