1
votes

I want to have some file database with a lot of text. I know how to create and read file, but in this case, I need to find specific line and then read it. I don't really care for permonace. My first Idea was to create a lot of smaller files and save them in some archive, but I don't even know, if fp support archives. Thanks for any help.

1

1 Answers

1
votes

Most Borland style dialects don't allow seeking in TEXTfiles. (the text(file) type in pascal).

There are two possible directions:

  1. file is small ( read in memory, process, write
  2. Switch to binary (file) mode, so that you can seek() in the file, and keep an index for fast access.