I just came accross another issue of string concatenation within my program
that worked okay before FPC 3 but fails after updating to FPC 3.
I had not used this function since the update so I found the problem
only now (by accident):

------------------------------------------
type MyStringType = string;
var S     : MyStringType;
    Liste : array of MyStringType;
    i     : SizeInt;

begin
[..] // "Liste" is setup with many string entries (which are also shown 
correctly with Ctrl+F7 (evaluate/modify)
S := '';
for i := Low(Liste) to High(Liste) do
   S := S+Liste[i]+LineEnding;
SetLength(Liste,0);
ShowMessage(S);
end;
------------------------------------------

"S" now always consists of only one line
even when "Liste" has many more.
The for-loop is passed multiple times
as expected but only the first pass adds
a line to "S".

Any idea why this code no longer works?


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to