EasyManuals Logo

Radio Shack TRS-80 Model 100 User Manual

Radio Shack TRS-80 Model 100
210 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 #129 background imageLoading...
Page #129 background image
Lesson
#18
Data Files
In
this Lesson you will learn how
to
read and write data files to cassette and RAM.
Data files allow you to store information for future reference. Some common examples
include:
A list
of
customer names and addresses
A list of items in inventory
Sales data
A list of students and their grades
A list of hourly data readings such as temperature, pressure, humidity, wind
velocity, wind direction and pollution index, etc.
You can save data files in either
RAM or on cassette. The easiest and most convenient
way to save a data file is in RAM. A RAM data file has the advantage of quick access
and does not require attaching an external device. The disadvantage of a RAM data
file, however, is that it uses up available memory space.
Cassette files are external to the Computer and do not use up valuable RAM space.
When storing a large data file, it
is
more practical
to
use cassette tape. For example, a
mailing list of
1000 names and addresses would require around 80K bytes of memory.
This exceeds the maximum memory capacity of your Computer,
so
a RAM data file is
out
of
the question. However, a list of this size could fit easily on a cassette file.
Experiment
#1
Writing a data file
to
RAM
The program below allows you to create a RAM file where various names may be
kept.
Clear memory using the NEW command and enter the following program:
100
CLS
110
OPEN
"RAM:NAMES"
FOR
OUTPUT
AS
1
120
INPUT
"NAME";
N$
130
IF
N$
=
""
GoTo
200
1a0
PRINT
#1,
N$
150
N$
=
""
:
GoTo
120
200
STOP
Execute this program and type the name John Smith when prompted, as shown below:
NAME?
John
SMith
The program will prompt you again to enter another name, and repeatedly
do
so until
(!RIEID
is
pressed with no name preceding it. Enter the names as shown below:
NAME?
Peter
Wolf
NAME?
Aloysius
T.
Cornpone
NAME?
JiM
Shoe
NAME?
Steele
Masnet
NAME?
Ray
D.
o'Shack
NAME?
123

Other manuals for Radio Shack TRS-80 Model 100

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Radio Shack TRS-80 Model 100 and is the answer not in the manual?

Radio Shack TRS-80 Model 100 Specifications

General IconGeneral
BrandRadio Shack
ModelTRS-80 Model 100
CategoryDesktop
LanguageEnglish

Related product manuals