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

Dennis dec12 at avidsoft.com.hk
Mon Dec 5 08:23:45 CET 2016


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)

Dennis


More information about the fpc-pascal mailing list