<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_1_1455957323500_3523"><span>Hi,</span></div><div></div><div id="yui_3_16_0_1_1455957323500_3515"> </div><div id="yui_3_16_0_1_1455957323500_3515" dir="ltr">I read this: <a href="http://www.freepascal.org/docs-html/ref/refse10.html" id="yui_3_16_0_1_1455957323500_3550">http://www.freepascal.org/docs-html/ref/refse10.html</a></div><div class="signature" id="yui_3_16_0_1_1455957323500_3512"><div id="yui_3_16_0_1_1455957323500_3511"><br></div><div id="yui_3_16_0_1_1455957323500_3511" dir="ltr">"Support for assigning values to typed constants is controlled by the {$J} directive: it can be switched off, but is <b id="yui_3_16_0_1_1455957323500_3904">on</b> by default (for Turbo Pascal compatibility). Initialized variables are always allowed."</div><div id="yui_3_16_0_1_1455957323500_3511" dir="ltr"><br></div><div id="yui_3_16_0_1_1455957323500_3511" dir="ltr">Then I read this: <a href="http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/devcommon/compdirswriteabletypedconstants_xml.html" id="yui_3_16_0_1_1455957323500_3736">http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/devcommon/compdirswriteabletypedconstants_xml.html</a></div><div id="yui_3_16_0_1_1455957323500_3511"><br></div><div id="yui_3_16_0_1_1455957323500_3511" dir="ltr">"In early versions of Delphi and Object Pascal, typed constants were always writeable, corresponding to the {$J+} state. Old source code that uses writeable typed constants must be compiled in the {$J+} state, but for new applications it is recommended that you use initialized variables and compile your code in the {$J-} state."</div><div id="yui_3_16_0_1_1455957323500_3511" dir="ltr"><br></div><div id="yui_3_16_0_1_1455957323500_3511" dir="ltr">I think we should follow Delphi in this case. Typed constant should not be writeable by default. That's what a constant should be. The old behavior is a flaw. At least let {$J-} be the default for {$MODE DELPHI} and {$MODE OBJFPC}.</div><div id="yui_3_16_0_1_1455957323500_3511" dir="ltr"><br></div><div id="yui_3_16_0_1_1455957323500_3511" dir="ltr">What do you think?</div><div id="yui_3_16_0_1_1455957323500_3511"><br></div>–Mr Bee<div id="yui_3_16_0_1_1455957323500_3551"><br></div></div></div></body></html>