[fpc-devel] type discussion

Marc Weustink marc.weustink at cuperus.nl
Thu Jun 2 17:07:43 CEST 2005

From: fpc-devel-bounces at lists.freepascal.org
[mailto:fpc-devel-bounces at lists.freepascal.org]On Behalf Of Jamie
Sent: donderdag 2 juni 2005 16:32

>var strlist : TStringlist;
>strlist := Tstringlist.create;
>I know strlist is a Tstringlist, the compiler knows it too as I have 
>declared it so why do I have to spell it out in the creation process?

What to do with virtual constructors or variables of a lower class ?


var strlist: TStrings;
strlist := Tstringlist.create; 


var strlist: TStrings; listclass: TStringsClass;

listclass := TStringlist;
strlist := listclass.create; 


More information about the fpc-devel mailing list