Am 29.04.2011 10:59, schrieb Hans-Peter Diettrich:
michael.vancann...@wisa.be schrieb:

But what is the cleaner way? To defer the expansion of {$I %xxx%}
inside macros, or to define c-like macros __LINE__ and __FILE__, maybe
with nicer names?

Defer expansion. The use of {$I } is mandatory, since __LINE__ and
friends are valid
pascal identifiers and this should not be changed by a macro.

What about %%LINE%%, or {%LINE%} or {{LINE}}?

I wonder why FPC broke Delphi compatibility by adding {$MODE}, instead
of choosing its own prefix for added compiler directives and macros.

I think an explicit {$ifdef FPC} is much more readable and everybody knows what's meant.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to