Am 18.09.2022 um 15:39 schrieb Hairy Pixels via fpc-pascal:
On Sep 18, 2022, at 7:37 PM, Florian Klämpfl via fpc-pascal
<fpc-pascal@lists.freepascal.org> wrote:
This is in general the case that $mode overrides all previously set switches
i.e. it simply sets the switches as defined by the given mode so I am not sure
if this is really worth a warning.
Is there ever a time where this would be useful to put a mode switch before the
mode? I always think about it like a 2 step process: 1) choose the mode and 2)
add extra features via mode switches. Unless I’m missing some use case it just
seems like a way to create bugs.
The thing is that it is not necessary to use a mode directive. Either
the user might be happy with the default mode FPC and just add some
modeswitch for extended functionality or the mode might be provided as a
command line parameter again with adding some special functionality.
And it would be much more effort to keep track of when a modeswitch
directive was used in case a mode directive is used later on. Just not
worth the effort as it's documented that a mode directive resets any
modeswitches.
Regards,
Sven
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal