[fpc-devel] Compiler directives in getopts unit

Sven Barth pascaldragon at googlemail.com
Thu Jan 17 22:23:51 CET 2019


Am 17.01.2019 um 20:29 schrieb wkitty42 at windstream.net:
> On 1/17/19 1:23 PM, Bart wrote:
>> It seems this code at one time needed to be compilable with TP.
>> AFAIK TP however does not support {$IF CONDITION} nor the Declared()
>> macro(?), so the source should not be compilable anymore with TP?
>
> if we set TP mode, what will happens if $IF is removed/changed?
>
> i still have a lot of TP code here and some of it has been ported to 
> FPC... some of that ported code has been recoded to use getopts which 
> allow a lot of other code to be stripped out because getopts handles 
> command line options much better...
Even if you set TP mode in your own unit that won't change the mode of 
the getopts unit. FPC can use units with different modes without any 
problems.

Also scanning condition expressions is nearly completely independant of 
the mode (one of the only exceptions is support for special MacPas 
directives in MacPas mode).

Regards,
Sven



More information about the fpc-devel mailing list