locked
Random Access Files RRS feed

  • Question

  • Will Randon Access Files Become a feature of small basic?
    Thursday, November 3, 2016 1:39 PM

Answers

  • You can aready use File.ReadLine and File.WriteLine which are random access in that you read and write at specific file lines, as well as InsertLine and AppenContents.

    What specifically are you thinking of that isn't there in the File commands.

    • Proposed as answer by Nonki Takahashi Saturday, November 5, 2016 2:58 PM
    • Marked as answer by litdev Friday, November 18, 2016 6:42 PM
    Thursday, November 3, 2016 6:58 PM
  • you can save any small basic variable on a line, including an array of data.  So put the the data you want to store in an array and save this to a line, which you can then read, edit replace etc.
    • Proposed as answer by Nonki Takahashi Saturday, November 5, 2016 2:58 PM
    • Marked as answer by litdev Friday, November 18, 2016 6:42 PM
    Thursday, November 3, 2016 10:29 PM

All replies

  • You can aready use File.ReadLine and File.WriteLine which are random access in that you read and write at specific file lines, as well as InsertLine and AppenContents.

    What specifically are you thinking of that isn't there in the File commands.

    • Proposed as answer by Nonki Takahashi Saturday, November 5, 2016 2:58 PM
    • Marked as answer by litdev Friday, November 18, 2016 6:42 PM
    Thursday, November 3, 2016 6:58 PM
  • I would like to store and retrieve multiple variables on lines of a file.

    John

    Thursday, November 3, 2016 10:22 PM
  • you can save any small basic variable on a line, including an array of data.  So put the the data you want to store in an array and save this to a line, which you can then read, edit replace etc.
    • Proposed as answer by Nonki Takahashi Saturday, November 5, 2016 2:58 PM
    • Marked as answer by litdev Friday, November 18, 2016 6:42 PM
    Thursday, November 3, 2016 10:29 PM
  • Thanks, I will try that.  That will solve my problem.

    John

    Thursday, November 3, 2016 10:34 PM
  • I thank you very much for this suggestion. It works and I now have a way of storing and retrieving  data from a text file. This makes small basic a very powerful programing language. It is simple, fun and easy to use.

    John

    Friday, November 4, 2016 10:04 PM