[fpc-pascal] Usage of FieldAddress
    Ryan Joseph 
    genericptr at gmail.com
       
    Sun Apr  4 20:15:54 CEST 2021
    
    
  
> On Apr 4, 2021, at 12:10 PM, Sven Barth via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
> 
> FieldAddress only works on published fields. Just like MethodAddress only works on published methods.
> 
> For private fields extended RTTI is required which is not yet implemented.
I don't understand this at all I guess. I thought the properties made them published and I get a "Symbol cannot be published, can be only a class" if I put the field itself in the published section.
Just trying to do this:
PInteger(theClass.FieldAddress('foo'))^ := 10;
Regards,
	Ryan Joseph
    
    
More information about the fpc-pascal
mailing list