- What Is This?
- Why Is It Better Than Standard?
- Author and Credits
- What do you need to pay?
- Installation
- Known problems
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.
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:
- DefaultExt property to handle default extensions
- automatic closing of the file when the object is being destroyed
- handling of long (>=255 characters) input strings in Delphi 1
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.
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
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.
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