[fpc-devel] Declare variables inside the code

Joerg Schuelke joerg.schuelke at gmx.de
Wed May 11 18:48:27 CEST 2011

Am Wed, 11 May 2011 19:11:40 +0200
schrieb Hans-Peter Diettrich <DrDiettrich1 at aol.com>:

> Since that time I don't wonder any more, why a C compiler 
> spends 50% of its time in scanning (and preprocessing) the input.

I would introduce a macro expansion trough a compiler directive. Then
there is no need to scan the whole program for macro occurrencies. You
"only" have to preprocess the including directive and the macro body.

Doing {$I %macro(p1,p2,..)} instead of simple macro(p1,p2,..) helps

It is a clean way, and pascal like. (in my eyes)


More information about the fpc-devel mailing list