On 28/4/11 10:00, Jürgen Hestermann wrote:


Darius Blaszyk schrieb:
Is there any way to initialize object variables, other than writing an
init method?
So something like:
myobj = object
myvar: word = $ffff;
end;
I don't think so.
An object is a pointer to a data structure on the heap.
At compile time, this data structure is not yet allocated.

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

I think objects are allocated on the stack (not the heap), but that does not help in circumventing the init method to initialize them.

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

Reply via email to