Go Down

Topic: #undef isn't explicitly documented (Read 3390 times) previous topic - next topic

shkaff

I wonder why a standard C term #undef isn't  explicitly documented comparing to #define which is explained:

https://www.arduino.cc/en/Reference/Define

Is it unsupported or what else? By mistake?

KeithRB

Because the docs are an overview of things that an inexperienced programmer might want to know. They do not cover all the intricacies of C/C++.

stowite

I wonder why a standard C term #undef isn't  explicitly documented comparing to #define which is explained:

https://www.arduino.cc/en/Reference/Define

Is it unsupported or what else? By mistake?
See https://gcc.gnu.org/onlinedocs/cpp/Index-of-Directives.html#Index-of-Directives and the parent pages.

stowite

What am I missing here? To my mind this is a simple software question about #undef . No change to the Arduino project has been proposed and none is required. #undef is a command within the C pre-processor (cpp) which has been in cpp for as long as I can remember and I have been using cpp for 30 odd years.

This should be moved back to to where it belongs - the "Programming Questions" forum.

el_supremo

I don't see it as a programming question. It is asking why documentation of #undef does not exist on the reference pages whereas #define does.

Pete
Don't send me technical questions via Private Message.

stowite

In which case it needs to be raised as an Arduino documentation bug and not just left to fester here.


Bigoldsofty

I have just tried the #undef because I have a need to use a variation of the servo library for a single servo but require an interrupt driven timer for a model clock.  So though simple: undefined _useTimer5, which will then allow me to define my own ISR for timer5.
Good idea while it lasted! It doesn't work so appears not to be supported.

Delta_G

#undef is most definitely supported by the pre-processor.  You've made some other mistake. 
|| | ||| | || | ||  ~Woodstock

Please do not PM with technical questions or comments.  Keep Arduino stuff out on the boards where it belongs.

AWOL

Quote
It doesn't work so appears not to be supported.
Works for me.

Go Up