I guess you're refering to the old tp days. If so you should be able to acheive constant object like that:<br><br>type<br>  TCObject = object<br>    P1: Double;<br>  end;<br><br>var<br>  MyCObject: TCObject;<br>begin<br>  
MyCObject.P1 := 0;<br>end.<br><br>This code should world although I haven't tested it.<br>But there is no easy(without some nasty hacking) way to have a class instance as a constant object.<br><br><div><span class="gmail_quote">
2006/5/2, Michael Müller <<a href="mailto:mueller_michael@nikocity.de">mueller_michael@nikocity.de</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
How can I declare a constant object?<br><br>var<br>  MyTest: TObject;<br>begin<br>  MyTest := TObject.Create;<br>end.<br><br>works (for sure).<br><br>How can I declare 'const'?<br><br>Thanks<br><br>Michael<br>_______________________________________________
<br>fpc-pascal maillist  -  <a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a><br><a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal">http://lists.freepascal.org/mailman/listinfo/fpc-pascal
</a><br></blockquote></div><br><br clear="all"><br>-- <br>Geno Roupsky