[lazarus] TinitFile Bug perhaps?
Michael Van Canneyt
michael.vancanneyt at wisa.be
Wed Apr 28 11:55:05 EDT 1999
On Wed, 28 Apr 1999, Michael A. Hess wrote:
> Cliff Baeseman wrote:
> >
> > I get an unhandled exception and a Out Of Memory error is thrown.
>
> I found the problem. To put a line space in the sequence I was adding an
> empty string to the TStringList. This used to work. I guess with
> AnsiStrings it causes a problem now. I have indicated the problem to
> Michael and I let you know when the FCL is fixed.
Michael (H. :) )
I added a line
TS.Add('');
to the test program I sent you, and it still works;
So this indicates that the error is probably elsewhere...
Michael.
PS. I attached the modified program for those that don't have it.
You should call it testd.pp, or you'll end up with troubles :)
program testd;
uses classes;
Var TS : TStringlist;
i : longint;
begin
TS:=TStringList.Create;
TS.Add('');
TS.Add('String 1');
TS.Add('String 2');
For I:=1 to TS.Count do
Writeln (i,': ',TS.Strings[I-1]);
Writeln (TS.Text);
TS.Clear;
TS.LoadFromFile('testd.pp');
Writeln ('Count : ',TS.Count);
For I:=1 to TS.Count do
Writeln (I,': ',TS.Strings[I-1]);
Writeln (TS.TExt);
end.
More information about the Lazarus
mailing list