Creating A Random File; Accessing A Random File; User's Quick Reference: Commands - Commodore 8000 Series User Manual

Business computer
Hide thumbs Also See for 8000 Series:
Table of Contents

Advertisement

34
Creating A Random File
The following steps are required to create a random file:
1. OPEN the file for random access. Write is implied by the logical record length:
DOPEN #1, "RANDOM", L20
2. Write data to each record using PRINT# :
PRINT #1, A$
Accessing A Random File
The following steps are required to update and access random records:
1. OPEN the file. Read is implied:
DOPEN #1, "RANDOM", L20
2. Use the RECORD command to select the record:
RECORD #1, I
3. INPUT the data:
INPUT #1, A$
User's Quick Reference: Commands
The User's Quick Reference, table 3, is intended
to
assist the user
in
becoming familiar with
the various commands used in both Version 3.0 and 4.0 BASIC.
In order to make Version 4.0 BASIC easier to use, disk commands have been incorporated
into the language. For example, with Version 4.0 BASIC:
• DBAVE and DLOAD commands eliminate the need to specify device number each
time you store and retrieve disk files.
• Directory display is now a one-step procedure and no longer interferes with the pro-
gram in memory.
• It
is no longer necessary to write a program to read the error channel. The variable
DS$ contains the error message.
• Fonnatting is now a one-step procedure through the use of HEADER command.
• Initialization is unnecessary on the 8050 Disk Drive.
It
is now an automatic feature
of that device.
Commands in Version 3.0 are upward compatible with Version 4.0 BASIC. That is, if you
are familiar with Version 3.0, those commands will still work on your 80-column Series
8000 Computer furnished with Version 4.0 BASIC. Tape commands are the same
in
both
versions of BASIC.
The User's Quick Reference has been designed as an aid to the user and it is suggested that a
copy be placed near your computer until you become familiar with the various commands.

Advertisement

Table of Contents
loading

Table of Contents