[fpc-devel] Macro Processing

Marco van de Voort marcov at stack.nl
Fri May 13 18:16:31 CEST 2011


In our previous episode, Hans-Peter Diettrich said:
> > For large scale and/or specialistic use, simply preprocess the sources
> > before compiling.
> 
> This doesn't help in any way, when it comes to updates of such code :-(
> Eventual error messages refer to the preprocessed code, but corrections
> should be applied to the unprocessed file - where?

Where the macro is used. If you don't want to get burned, stay away from
fire.

> And what about modifications to the preprocessed file - these are lost
> after the next preprocessor run.

Well, you shouldn't then, obviously.
 
> Okay, one can take that as an argument against *any* preprocessing, but
> this doesn't help anybody who has a valid reason for using an
> preprocessor. 

I have used that technique several times. I don't see what is wrong with it.

Sure there are downsides, like any solution, but we are talking about a few
promille of problems not solved by other means.
 
> Look at the many includes in the cpu declarations, created by external
> tools...

?



More information about the fpc-devel mailing list