[fpc-pascal] Initialize the object (not class)
jonas.maebe at elis.ugent.be
Sun Jul 18 21:20:48 CEST 2010
On 18 Jul 2010, at 21:01, Zaher Dirkey wrote:
> MyObject = object
> FProp1: integer;
> Prop1: integer read FProp1 write FProp1
> procedure Proc1;
> used like
> O: MyObject;
> 1 - The problem, i have random value in the prop1(I am not sure about it),
> is that mean i must initiliaze it.
That's correct. An object is basically the same as a record, except that it can have methods (although in later Delphi versions, records also can have methods).
> 2 - is there a method i can override it to init my properties without to
> call it manualy O.init;
More information about the fpc-pascal