[fpc-devel] Ref documentation doesn't mention "deprecated" keyword

Paul Ishenin ip at kmiac.ru
Mon Jun 1 10:15:36 CEST 2009

Graeme Geldenhuys wrote:
> I searched the ref.pdf document, especially under the class definition
> section. It doesn't mention anywhere in that document that the Object
> Pascal language supports the "deprecated" keyword.
> PS:
> Can you mark a whole class as deprecated?  As far as I know the
> deprecated keyword can only be used on methods in a class, not the
> class itself. The latter would be very handy.

I am wondering why not to try?

   TMyClass = class(TObject)
   end deprecated;


SomeUnit.pas(x,y) Warning: Symbol "TMyClass" is deprecated

As I know you can deprecate any symbol and even unit.

Best regards,
Paul Ishenin.

More information about the fpc-devel mailing list