[fpc-pascal] Constant object
groupsky at gmail.com
Thu May 4 14:57:23 CEST 2006
I guess you're refering to the old tp days. If so you should be able to
acheive constant object like that:
TCObject = object
MyCObject.P1 := 0;
This code should world although I haven't tested it.
But there is no easy(without some nasty hacking) way to have a class
instance as a constant object.
2006/5/2, Michael Müller <mueller_michael at nikocity.de>:
> How can I declare a constant object?
> MyTest: TObject;
> MyTest := TObject.Create;
> works (for sure).
> How can I declare 'const'?
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal