On Fri, Mar 1, 2013 at 5:31 PM, Daniel Gaspary <dgasp...@gmail.com> wrote: > > Is possible to have a Class constant with different values in class > descendants ?
Afaik no, but you can override class virtual methods which might give you the correct value: TA = class protected class function value: integer; virtual; abstract; public class function getvalue: integer; end; TB = class(TA) protected class function value: integer; override; end; TC = class(TA) protected class function value: integer; override; end; Joao Morais _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal