On Wed, 20 Jun 2018, Ryan Joseph wrote:

Are there any plans to make a proper preprocessor like #define in C?  I’m
not saying this is good programming practice or anything but I just had a
really annoying copy and paste chore on some temporary code which I could
have easily accomplished if I had #define like in C.  It’s such a trivial
thing to add I wonder why it was never included in Pascal.

Because it is simply a bad idea ?

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.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to