[fpc-pascal] how to use Default to replace this " FillChar(aRecord, sizeof(aRecord), 0);

Dennis Poon dennis at avidsoft.com.hk
Mon Dec 5 12:44:33 CET 2016



Sven Barth wrote:
>
> Am 05.12.2016 08:24 schrieb "Dennis" <dec12 at avidsoft.com.hk 
> <mailto:dec12 at avidsoft.com.hk>>:
> >
> > In this old statement, I don't need to know the type of aRecord
> > but if I want to use Default, I have to know the exact type of the 
> varaible aRecord and pass it to Default(aRecordType) e.g. aRecord := 
> Default(aRecordType)  //where var  aRecord : aRecordType
> >
> > Is it possible to use default without knowing the variable type? (it 
> is because sometimes the type get renamed)
>
> No, it's not possible. You'll simply have to rename one more location.
>
> Regards,
> Sven
>
>
Thanks.



More information about the fpc-pascal mailing list