Hi, Is there any FPC command line option for writable constanst directive {$J} or {$WRITEABLECONST} ? Since I knew this directive, I always set it to {$J-} (because {$J+} is ridiculous). However, sometimes I forget to put it in to my source code. So, I'd like to put it in to a batch script that calls fpc with all the required compiler settings for all my programs. Unfortunately, I haven't found compiler option for this directive. Any help is appreciated. Thank you. Regards, _______________________________________________ fpc-pascal maillist - [hidden email] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal |
Am 08.10.2017 06:39 schrieb "Mr Bee via fpc-pascal" <[hidden email]>: No, there is not. Regards, _______________________________________________ fpc-pascal maillist - [hidden email] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal |
2017-10-08 9:03 GMT+02:00 Sven Barth via fpc-pascal
<[hidden email]>: > Am 08.10.2017 06:39 schrieb "Mr Bee via fpc-pascal" > <[hidden email]>: >> >> Hi, >> >> Is there any FPC command line option for writable constanst directive {$J} >> or {$WRITEABLECONST} ? > > No, there is not. > There is my old feature request about it https://bugs.freepascal.org/view.php?id=30344 :) You can monitor it. Regards, Michalis _______________________________________________ fpc-pascal maillist - [hidden email] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal |
In reply to this post by Free Pascal - General mailing list
On Sun, Oct 8, 2017 at 1:38 AM, Mr Bee via fpc-pascal
<[hidden email]> wrote: > Hi, > > Is there any FPC command line option for writable constanst directive {$J} > or {$WRITEABLECONST} ? > > Since I knew this directive, I always set it to {$J-} (because {$J+} is > ridiculous). However, sometimes I forget to put it in to my source code. So, > I'd like to put it in to a batch script that calls fpc with all the required > compiler settings for all my programs. Unfortunately, I haven't found > compiler option for this directive. > > Any help is appreciated. Thank you. Most developers are using single .inc file that contains all directives for the whole project. You only need to remember to include this file in all units of your projects. Regards, Marcos Douglas _______________________________________________ fpc-pascal maillist - [hidden email] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal |
In reply to this post by Michalis Kamburelis-3
> There is my old feature request about it
> https://bugs.freepascal.org/view.php?id=30344 :) You can monitor it. No one seems to care to implement it, so if you badly need it: sj.patch <http://free-pascal-general.1045716.n5.nabble.com/file/t111899/sj.patch> Apply in compiler directory (please checkout r37430 at least), I only svn diff there, not in the top level directory (I have modifications to certain packages). -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ _______________________________________________ fpc-pascal maillist - [hidden email] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal |
Am 08.10.2017 22:24 schrieb "leledumbo via fpc-pascal" <[hidden email]>: Applied in r37437. Thank you for the patch. Regards, _______________________________________________ fpc-pascal maillist - [hidden email] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal |
Thank you, both to Leledumbo and Sven. Will this patch be available in the next FPC v.3.0.4 release?
Pada Selasa, 10 Oktober 2017 04.44.44 WIB, Sven Barth via fpc-pascal <[hidden email]> menulis:
Am 08.10.2017 22:24 schrieb "leledumbo via fpc-pascal" <[hidden email]>: Applied in r37437. Thank you for the patch. Regards, _______________________________________________ fpc-pascal maillist - [hidden email] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - [hidden email] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal |
In reply to this post by Marcos Douglas B. Santos
2017-10-08 23:17 GMT+07:00 Marcos Douglas B. Santos <[hidden email]>:
Well, I don't like such approach. I prefer using my own shell script that I can configure for many purposes and conditions such as build release, build debug, build test, build deploy, etc.. which each has different compiler setting with custom before/after action.. Regards, –Mr Bee _______________________________________________ fpc-pascal maillist - [hidden email] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal |
In reply to this post by Free Pascal - General mailing list
In our previous episode, Mr Bee via fpc-pascal said:
> Thank you, both to Leledumbo and Sven. Will this patch be available in the next FPC v.3.0.4 release? Since it is already largely uploaded, no. We are only waiting on some targets. _______________________________________________ fpc-pascal maillist - [hidden email] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal |
In reply to this post by Free Pascal - General mailing list
On 08/10/17 21:24, leledumbo via fpc-pascal wrote:
>> There is my old feature request about it >> https://bugs.freepascal.org/view.php?id=30344 :) You can monitor it. > > No one seems to care to implement it, so if you badly need it: sj.patch > <http://free-pascal-general.1045716.n5.nabble.com/file/t111899/sj.patch> > Apply in compiler directory (please checkout r37430 at least), I only svn > diff there, not in the top level directory (I have modifications to certain > packages). > Now a patch has been integrated for this , perhaps it could be added to Lazarus Project Options | Compiler Options | Parsing BTW why would anyone want {$WRITEABLECONST ON} writable constants is an oxymoron and goes against the whole philosophy of strict types which is central to Pascal. :? _______________________________________________ fpc-pascal maillist - [hidden email] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal |
On Tue, Oct 10, 2017 at 9:33 AM, <[hidden email]> wrote:
> Now a patch has been integrated for this , perhaps it could be added to > Lazarus Project Options | Compiler Options | Parsing Patches are welcome also for that. The option must be either hidden for compiler versions that do not support it, or there must be a clear note / hint about it. Juha _______________________________________________ fpc-pascal maillist - [hidden email] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal |
In reply to this post by pascalX
Am 10.10.2017 08:49 schrieb <[hidden email]>: They were used mainly back at TP times to have procedure local static variables (cause that is how they behave as inside procedures). Regards, _______________________________________________ fpc-pascal maillist - [hidden email] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal |
In reply to this post by Marco van de Voort
2017-10-10 13:28 GMT+07:00 Marco van de Voort <[hidden email]>:
Regards, –Mr Bee _______________________________________________ fpc-pascal maillist - [hidden email] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal |
In reply to this post by Free Pascal - General mailing list
2017-10-10 16:21 GMT+07:00 Sven Barth via fpc-pascal <[hidden email]>:
Can we make the {$J-} as default in fpc and objfpc mode for the next major release? Regards, –Mr Bee _______________________________________________ fpc-pascal maillist - [hidden email] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal |
>> They were used mainly back at TP times to have procedure local static variables (cause that is how they behave as inside procedures). +1 _______________________________________________ fpc-pascal maillist - [hidden email] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal |
In reply to this post by Free Pascal - General mailing list
Am 11.10.2017 07:00 schrieb "Mr Bee via fpc-pascal" <[hidden email]>: The default of $J will change in *no* existing mode as that will break backwards compatibility. It doesn't matter whether it's a major release or not. Regards, _______________________________________________ fpc-pascal maillist - [hidden email] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal |
In reply to this post by Free Pascal - General mailing list
Am 11.10.2017 05:12 schrieb "Mr Bee via fpc-pascal" <[hidden email]>: It doesn't matter whether it's minor. Building has already started and we definitely won't start that again for something like this. Regards, _______________________________________________ fpc-pascal maillist - [hidden email] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal |
In reply to this post by Free Pascal - General mailing list
On Tue, October 10, 2017 11:21, Sven Barth via fpc-pascal wrote:
> Am 10.10.2017 08:49 schrieb <[hidden email]>: >> BTW why would anyone want >> {$WRITEABLECONST ON} >> >> writable constants is an oxymoron and goes against the whole philosophy > of strict types which is central to Pascal. > > They were used mainly back at TP times to have procedure local static > variables (cause that is how they behave as inside procedures). Just adding to what has been mentioned previously - they were the only possibility for variables initialized at compile time at that time. That's how mode FPC started as well - possilibity of specifying the initial value for a "var" was added much much later. Tomas _______________________________________________ fpc-pascal maillist - [hidden email] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal |
Free forum by Nabble | Edit this page |