[fpc-devel] Macro Processing

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

In our previous episode, Hans-Peter Diettrich said:
> > I really thing we should first collect use cases and maybe improve
> > existing solutions if needed instead of opening another can.
> ACK. Here a first example:
> We often have enumerated types, with arrays of strings or other 
> associated information, that must be kept in sync (array dimension and 
> content). Macros with parameters would allow to create these tightly 
> coupled declarations from a single piece of text, acting as a table from 
> which the enum can be created from column 1, a name array from column 1 
> or 2, a list of procedure pointers from column 3, etc.

This is general case for generating source code, not for macros.

Why? It is not distributed throughout the source. This can be localized in a
single includefile which can be generated easily from whatever coherent
source you have, including a designtime solution in lazarus that allows you
to edit it comfortable in table form.

More information about the fpc-devel mailing list