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 <[EMAIL PROTECTED]> 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

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

Reply via email to