MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghumor/comments/1vv58vy/how_do_you_disable_your_code/p56eg9z/
r/programminghumor • u/developer_axe • Aug 22 '26
91 comments sorted by
View all comments
20
#if 0
#endif
2 u/Teoyak Aug 22 '26 I don't know if it works with every language. But yeah, I used this a lot when I worked on C. 2 u/Aln76467 Aug 29 '26 The c preprocessor is language-independent. Just tell your c compiler to output preprocessed code, and now you can use it as a js bundler or whatever. 1 u/Square-Singer Aug 23 '26 edited Aug 23 '26 The preprocessor is pretty C/C++ specific. I don't know another language that uses it like that. 1 u/MCWizardYT Aug 23 '26 I think you meant C/C++, C# doesn't have the same preprocessor that those 2 share 1 u/Square-Singer Aug 23 '26 Correct, was a typo. I first wanted to write that not even C# has the preprocessor, then changed the sentence and typed the wrong name. 1 u/Maqi-X Aug 30 '26 It is not. I one used it to preprocess markdown. Don't do this. But yeah, it's possible, the preprocessor itself is not tied to C/C++ you can use it for everything 1 u/Emotional-Audience85 Aug 23 '26 But then the code won't be compiled,
2
I don't know if it works with every language. But yeah, I used this a lot when I worked on C.
2 u/Aln76467 Aug 29 '26 The c preprocessor is language-independent. Just tell your c compiler to output preprocessed code, and now you can use it as a js bundler or whatever. 1 u/Square-Singer Aug 23 '26 edited Aug 23 '26 The preprocessor is pretty C/C++ specific. I don't know another language that uses it like that. 1 u/MCWizardYT Aug 23 '26 I think you meant C/C++, C# doesn't have the same preprocessor that those 2 share 1 u/Square-Singer Aug 23 '26 Correct, was a typo. I first wanted to write that not even C# has the preprocessor, then changed the sentence and typed the wrong name. 1 u/Maqi-X Aug 30 '26 It is not. I one used it to preprocess markdown. Don't do this. But yeah, it's possible, the preprocessor itself is not tied to C/C++ you can use it for everything
The c preprocessor is language-independent. Just tell your c compiler to output preprocessed code, and now you can use it as a js bundler or whatever.
1
The preprocessor is pretty C/C++ specific. I don't know another language that uses it like that.
1 u/MCWizardYT Aug 23 '26 I think you meant C/C++, C# doesn't have the same preprocessor that those 2 share 1 u/Square-Singer Aug 23 '26 Correct, was a typo. I first wanted to write that not even C# has the preprocessor, then changed the sentence and typed the wrong name. 1 u/Maqi-X Aug 30 '26 It is not. I one used it to preprocess markdown. Don't do this. But yeah, it's possible, the preprocessor itself is not tied to C/C++ you can use it for everything
I think you meant C/C++, C# doesn't have the same preprocessor that those 2 share
1 u/Square-Singer Aug 23 '26 Correct, was a typo. I first wanted to write that not even C# has the preprocessor, then changed the sentence and typed the wrong name.
Correct, was a typo. I first wanted to write that not even C# has the preprocessor, then changed the sentence and typed the wrong name.
It is not. I one used it to preprocess markdown. Don't do this. But yeah, it's possible, the preprocessor itself is not tied to C/C++ you can use it for everything
But then the code won't be compiled,
View all comments
20
u/NicholasVinen Aug 22 '26
#if 0
#endif