2011/11/18 John Lee <johnel...@gmail.com>: > Never seen this before - is there a way I can force fnb to use the main > program's version of fna, not the version that's in the unit? > TIA John
Your problem sounds very much like you would really want to make use of objects, inheritance and virtual methods. Instead of passing procedure variables to modify or specialize the behavior of Jim.fnb you would make Jim a class with virtual methods: You could have a class TJim (declared in the unit jim) with two methods fna and fnb and you would declare fna as a virtual method (so it can later be overridden). In your main program you would declare a class TFred derived from TJim and override fna. Then when you make an instance of TFred and call Fred.fnb the code of fnb would automatically use the fna method of TFred. Bernd _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal