[fpc-pascal] class abstract
idokan at gmail.com
Fri May 6 21:55:03 CEST 2011
On Fri, May 6, 2011 at 22:47, Sven Barth <pascaldragon at googlemail.com>wrote:
> On 06.05.2011 21:21, ik wrote:
>> I have two questions regarding class Abstract:
>> 1. From what version of FPC does it support ?
> At least 2.4.2 supports it. It might be 2.4.0 as well (I don't know that
> for sure though).
> 2. Can I inherit from a class and the new class that I declare can be
>> set as abstract ?
>> I mean
>> TClassA = class abstract
>> TClassB = Class(TClassA) abstract ?
>> If so, then what am I missing here? FPC (2.5.1) tell me that it is
>> expecting ":", but "abstract" was found.
> The "abstract" needs to be put after the "class" and before the parent
> class (it's strange, but the way Borland has decided things are done...):
Thanks, that works :)
> TClassB = class abstract(TClassA)
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal