[fpc-pascal] Proper preprocessor?

Ryan Joseph ryan at thealchemistguild.com
Wed Jun 20 11:25:39 CEST 2018



> On Jun 20, 2018, at 3:50 PM, Michael Van Canneyt <michael at freepascal.org> wrote:
> 
> Because it is simply a bad idea ?

Yeah that’s what the programming gurus in ivory towers and professors keep saying but what about the person actually trying to finish some work? It really sucks trying to fight the compiler sometimes because of engrained dogma.

How does an external preprocessor work if the compiler doesn’t about it? Doesn’t it totally mess up the line numbers for debugging? I’d happily write my own even if it was compatible with the compiler.

> 
> Pascal has some trivial macro support. {$define m:=xyz}
> 
> If you need more than that, you can use m4 or so. Lazarus has support for
> pre-compile commands, so you can always configure it to preprocess your
> files if you are so inclined.

Regards,
	Ryan Joseph




More information about the fpc-pascal mailing list