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 that using the feature. I prefer to put it in a config file or call it from command line, as default setting, so my code is cleaner from such things. Is it possible? Thank you. Regards, –Mr Bee Pada Selasa, 4 Februari 2020 13.42.10 WIB, Sven Barth via fpc-pascal <fpc-pascal@lists.freepascal.org> menulis: 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<x>, 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 maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal