Skip to main content

Using random access files

  • Chapter
Practical BASIC Programming

Part of the book series: Computer Science Series ((COMPSS))

  • 22 Accesses

Abstract

The final section of this book gives you a start in the use of random, or direct, access files. The important feature that these files have that serial files do not is that any record in the file can be read from or written to directly and without reference to any other records in the file. Once the file has been opened we can access any record for reading or writing without any change in mode. To open a random file we have to use the instruction

$$ OPEN\,R,fn,FILENAME $$

where fn is the logical number of the file within that program. Each record on the file is allowed to be up to 28 bytes in length and each record can only contain string data.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Author information

Authors and Affiliations

Authors

Copyright information

© 1982 P. E. Gosling

About this chapter

Cite this chapter

Gosling, P.E. (1982). Using random access files. In: Practical BASIC Programming. Computer Science Series. Palgrave, London. https://doi.org/10.1007/978-1-349-06624-7_5

Download citation

  • DOI: https://doi.org/10.1007/978-1-349-06624-7_5

  • Publisher Name: Palgrave, London

  • Print ISBN: 978-0-333-34591-7

  • Online ISBN: 978-1-349-06624-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics