how to do member function pointer in D?

BCS ao at pathlink.com
Thu Jul 31 10:02:13 PDT 2008


Reply to u,

>> Do you want nothing at all to be assigname to the variable after the
>> fist
>> assigment?
>> class Bob {void a(){} void b(){} }
>> The_Type fnp = Bob.a;
>> fnp = Bob.a; // valid or not?
> Can fnp be invoked on an actual object? and what's the syntax?
> 

the whole thing is hypothetical so ...

> Bob bob = new Bob();
> fnp(bob);  // ? how to make this call?
>> Do you care if other instances of the same type have pointers to
>> other function? The_Type fnp = Bob.a;
>> 





More information about the Digitalmars-d mailing list