[fpc-pascal] advanced macros?

Roland Schaefer roland.schaefer at fu-berlin.de
Tue Jul 7 13:57:16 CEST 2009


Hi,
reading the Programmer's Manual, I get the impression that C-style
macros with {$MACRO ON} cannot do things like C

#define MY_MACRO(param1,param2...)
    code_with ( param1 && param 2 );

i.e., passing strings macros for in-macro insertion. Is this true? If
yes, are there any plans to include such capabilities in the
preprocessor? It would be very useful in places. On the other hand, the
mighty preprocessor is one of the primary obfuscation "tools" in C.

One related question: In current FPC macros, can I include {$IFDEF}s? I
did it, and without using the macro, the unit compiles ok, but I get
various errors whenever I use the macro.

Cheers, thanks a lot
Roland



More information about the fpc-pascal mailing list