On Fri, May 6, 2011 at 22:47, Sven Barth <pascaldra...@googlemail.com>wrote:

> On 06.05.2011 21:21, ik wrote:
>
>> Hello,
>>
>> 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
>> ...
>> end;
>>
>> 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)
>
> Regards,
> Sven
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>


Ido
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to