[fpc-pascal] class constants
Joao Morais
post at joaomorais.com.br
Thu Jan 24 11:12:13 CET 2008
Leonardo M. Ramé wrote:
> Jonathan,
> I never needed such type of feature, a propossed solution is to create one unit per class, and
> declare your constants in the implementation section of each unit.
A class function would be a better approach.
> Example:
>
> unit People
>
> interface
>
> type
> TPeople = class
> ..
> end;
>
> implementation
>
> const
> name = 'default name';
>
> ...
>
> end.
>
> --- Jonathan Benedicto <contact at jomitech.com> wrote:
>
>> Hello,
>>
>> Does FPC support class constants, and if it doesn't, are there any plans to
>> add this support?
>>
>> Example:
>> type
>> TMyClass = class
>> begin
>> private
>> const MyConst = '123';
>>
>> end;
>>
>> Jon
>>
>
More information about the fpc-pascal
mailing list