[fpc-devel] Abstract functons with parameters on classes

ik idokan at gmail.com
Thu Jul 27 17:49:32 CEST 2006


Hi all,

Is there a way to do the following ?
...
{$MODE OBJFPC}
type
  TA = class
  public
    function fnc : Boolean; virtual; abstract;
  end;


  TA2 = class (TA)
  public
    function fnc (const a : Boolean) : Boolean; override;
  end;
...

The issue is that TA is an abstract class, while TA2 and anything else
will inherit this class, but will implement different things/ways of
things ... so the "fnc" function will need a different structure on
each class.

Please note that the above way does not work for me (maybe because I
have more then one override for the "fnc" function ?).

Thanks,

Ido



More information about the fpc-devel mailing list