[fpc-devel] TStrings.Assign doesn't copy Delimiter

Vincent Snijders vsnijders at quicknet.nl
Wed Feb 22 09:46:35 CET 2006


Hi,

The program below exits with an error. I would expect the Delimiter to be copied 
too, when a TStrings is assigned. Is this a bug?

Vincent

{$mode objfpc}{$H+}

uses
   Classes;

var
   s1, s2: TStrings;

begin
   s1 := TStringList.Create;
   s1.Delimiter := ';';
   s2 := TStringList.Create;
   s2.Assign(s1);
   if s1.Delimiter<>s2.Delimiter then
     Halt(1);
   writeln('Success');
   readln;
end.




More information about the fpc-devel mailing list