[fpc-pascal] Variable of class method type of function

Sven Barth pascaldragon at googlemail.com
Tue Jul 17 07:11:15 CEST 2012


Am 17.07.2012 01:10 schrieb "waldo kitty" <wkitty42 at windstream.net>:
>
> On 7/15/2012 08:13, Jonas Maebe wrote:
>>
>> On 15 Jul 2012, at 14:05, CA Gorski wrote:
>>
>>> How to declare a variable of class method type of function?
>>>
>>> ...
>>> var
>>>     MyVar: function(AParam: string): boolean of class;
>>> ...
>>> gives an error using FPC 2.6.1 (Win64).
>>
>>
>> You have to use "of object", just like for a regular method.
>
>
> pardon my intrusion but i'm looking for clarification...
>
> in the beginning we had objects... then classes came along and they were
the "new object" as objects should have been written to start with
(parroting)... so now we need to remember to use "of object" when we are
working with nothing but classes?

Ask Borland why they decided to use "of object" instead of "of class". It's
nevertheless now part of Pascal's heritage.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20120717/80ac5394/attachment.html>


More information about the fpc-pascal mailing list