[fpc-pascal] Proper preprocessor?

Florian Klämpfl florian at freepascal.org
Wed Jun 20 22:50:54 CEST 2018


Am 20.06.2018 um 10:33 schrieb Ryan Joseph:
> Are there any plans to make a proper preprocessor like #define in C? 

No.

1.
 From http://www.toodarkpark.org/computers/humor/shoot-self-in-foot.html:

 > Pascal
 >    The compiler won't let you shoot yourself in the foot.

2.
The unit concept renders macros often useless.

> 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.

Such quick and dirty temp. code can be often easily created by the macro functionality of the use editor.



More information about the fpc-pascal mailing list