1. What Is This?
  2. Why Is It Better Than Standard?
  3. Author and Credits
  4. What do you need to pay?
  5. Installation
  6. Known problems


What Is This?

This unit is an object-oriented wrapper around the Delphi TextFile type. Note this is NOT a component. I didn't feel like creating a component. If you want to make it a component, or you want me to do that, let me know.

Why Is It Better Than Standard?

Originally it was planned as simply an object-oriented wrapper around standard Delphi TextFile type. I found myself multiple times writing code like that:
var
   q : TextFile;
begin
    q.ReWrite;
    q.WriteLn('Test');
    q.CloseFile;
end;
but it didn't compile. After I made a wrapper some goodies were thrown in too:

Author and Credits

Copyright ©1997-1998 Syarzhuk Kazachehnka
Code modifications
I can't help if you have a problem with the source that was modified by someone else. Therefore, if you want to make any changes, please email them back to me so I can include them in the next release.

What do you need to pay?

Nothing!

I don't and I don't plan to charge anything for this code. However, I do require you to send me email if you use them. I want to keep track of my "customers". Once again, my email address is bamboo7431@hotmail.com

Installation

Simply put TxtFile.Pas into one of the directories where your library path points to. This is not a component and it doesn't need to be installed into Component Palette.

Known Problems

Nothing that I am aware of. There was a problem with reading text files in Delphi 1 when the length of input string was equal to or more than 255 characters but it seems that
   System.Read(FTextFile, S);
   if System.Eoln(FTextFile) then
      System.ReadLn(FTextFile);
fixed that.
Back to the top