[fpc-pascal] Initialization of class field

Krzysztof dibo20 at wp.pl
Tue Jul 31 14:47:31 CEST 2012


Hi,

I'm reading about variable initialization
(http://www.freepascal.org/docs-html/ref/refse22.html) . Can I
initialize class field too? Like in Java:

type
  TMyClass = class
  private
    FSomeField: Integer = 123;
end;

I always initialize this in overrided constructor, but above example
is much faster.

Regards.



More information about the fpc-pascal mailing list