Re: [fpc-pascal] $modeswitch from command line

2020-02-05 Thread Jonas Maebe
On 05/02/2020 19:04, Jonas Maebe wrote: >> Based on the official >> document¹, the -M option is to select language modes, not language features. > > It will be fixed. Tomas already added it to the output of fpc -h in trunk in the mean time. Jonas ___

Re: [fpc-pascal] $modeswitch from command line

2020-02-05 Thread Jonas Maebe
On 05/02/2020 10:45, Mr Bee via fpc-pascal wrote: > It’s a great info, Jonas. Thank you. > > I didn’t know FPC has -M option for $modeswitch. Sven mentioned earlier that it does: https://lists.freepascal.org/pipermail/fpc-pascal/2020-February/057337.html > Based on the official > document¹, the

Re: [fpc-pascal] $modeswitch from command line

2020-02-05 Thread Mr Bee via fpc-pascal
It’s a great info, Jonas. Thank you. I didn’t know FPC has -M option for $modeswitch. Based on the official document¹, the -M option is to select language modes, not language features. I know changing language mode would reset mode switches. It’s no problem for me because I wrote the code and I s

Re: [fpc-pascal] $modeswitch from command line

2020-02-04 Thread Jonas Maebe
On 04/02/2020 10:06, Mattias Gaertner via fpc-pascal wrote: > As Sven explained a $mode resets all modeswitches. > What you need is a switch to alter modeswitch of a mode. And > there is currently no such switch. > > For example a syntax could be: > -MObjFPC+AdvancedRecords+AnsiStrings-NestedComme

Re: [fpc-pascal] $modeswitch from command line

2020-02-04 Thread Mattias Gaertner via fpc-pascal
On Tue, 4 Feb 2020 08:41:22 + (UTC) Mr Bee via fpc-pascal wrote: > As mention in the email title, what I meant is {$modeswitch} not > {$mode} as explain > here: https://www.freepascal.org/docs-html/prog/progsu105.html > > For example, if I want to use extended record in objfpc mode, then I >

Re: [fpc-pascal] $modeswitch from command line

2020-02-04 Thread zh loza via fpc-pascal
I personally find it very convenient to have a global include file for such features. E.g. we have a global.inc with {$mode objfpc}{$modeswitch advancedrecords} and include it {$include global.inc} in every file of our project. This way we can easily modify a lot of compiler directives / macros tha

Re: [fpc-pascal] $modeswitch from command line

2020-02-04 Thread Mr Bee via fpc-pascal
As mention in the email title, what I meant is {$modeswitch} not {$mode} as explain here: https://www.freepascal.org/docs-html/prog/progsu105.html For example, if I want to use extended record in objfpc mode, then I have to define {$mode objfpc}{$modeswitch advancedrecords} in every single file

Re: [fpc-pascal] $modeswitch from command line

2020-02-03 Thread Sven Barth via fpc-pascal
Am 03.02.2020 um 23:19 schrieb Mr Bee via fpc-pascal: Hi all, Is there a way to enable a mode switches from fpc command line? Yes, using -M, however these are discarded as soon as a $Mode directive is read (just like any $Mode directive resets any $Modeswitch directive). Regards, Sven ___

[fpc-pascal] $modeswitch from command line

2020-02-03 Thread Mr Bee via fpc-pascal
Hi all, Is there a way to enable a mode switches from fpc command line? Thank you. Regards, ~Bee ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal