[fpc-pascal] What's wrong with this simple test program
Joost van der Sluis
joost at cnoc.nl
Fri Dec 19 21:53:43 CET 2014
On 12/19/2014 09:48 PM, Ralf Quint wrote:
> I have been trying to use tStringList in a larger project of mine, but
> this just keeps bombing out with a exception.
> I have been able to reproduce the problem with this very simple test
> program project1;
> USES Classes;
> Var T : tStringList;
> S : String;
> S := 'Test';
> // T.Clear;
> T.Add (S);
You're mixing old TP-style objects with classes.
T := TStringList.Create is the correct syntax.
More information about the fpc-pascal