GET# 1, A$: A= ASC(A$) is commonly used in programs to examine
tape data. To avoid error messages, the line should be modified to
GET#1, A$: A=ASC(A$+CHR$(0)). The
CHR$(0) at the end acts as insurance
against empty strings, but doesn't affect the
ASC function when there are
other characters in
Diskettes allow 3 different forms of data storage. Sequential files are similar to those on tape, but several can can be used at the same time. Relative files let you organize the data into records, and then read and replace individual records within the file. Random files let you work with data anywhere on the disk. They are organized into 256 byte sections called blocks.
PRINT# statement's limitations are discussed in the section on
cassette tape. The same limitations to format apply on the disk.
or commas are needed to separate your data. The
CHR$(0) is still read by
GET# statement as an empty string.
Relative and random files both make use of separate data and command "channels." Data written to the disk goes through the data channel, where it is stored in a temporary buffer in the disk's RAM. When the record or block is complete, a command is sent through the command channel that tells the drive where to put the data, and the entire buffer is written.
Applications that require large amounts of data to be processed are best stored in relative disk files. These will use the least amount of time and provide the best flexibility for the programmer. Your disk drive manual gives a complete programming guide to use of disk files.
|This page has been created by Sami Rautiainen.|
|Read the small print.||Last updated May 20, 1998.|