On 18 Jul 2010, at 21:01, Zaher Dirkey wrote:

> MyObject = object
> private
>  FProp1: integer;
> public
>  Prop1: integer read FProp1 write FProp1
>  procedure Proc1;
> end;
> 
> used like
> var
>  O: MyObject;
> begin
>  O.Proc1;
> end;
> 
> 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;

No.


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

Reply via email to