Arrays and File Processing

Cards (6)

  • Arrays are traditionally a static data structure made up of a number of elements with a single data type and are accessed by the same name.
  • Operations on Arrays:
    • Load initial information into an array for processing
    • Process the elements of the array
    • Store results of processed data into the elements of the array
    • Search the array for a specific element
  • Text files consists of lines of text that are read or written consecutively as strings.
  • Input the correct keywords:
    OPENFILE "file.txt" FOR READ
  • The types of file modes include:
    • READ
    • WRITE
    • APPEND
  • Operations on Files:
    • READFILE <File identifier>, <Variable> | To read a file's contents
    • EOF | Stands for End Of File
    • WRITEFILE <File identifier>, <Variable> | To write into a file
    • CLOSEFILE <File identifier> | To close a file