Any way to define a var name CONTROL in root script?


Please read tips for efficient and successful posting and posting code

_ROOT Version:6.22
_Platform:mac os x
_homebrew version
__

it seems the root using the header tty.h with an macro define
Is there a way to define a var name CONTROL in root script?

root[000000]:> double CONTROL=3
ROOT_prompt_0:1:8: error: expected unqualified-id
double CONTROL=3
       ^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/tty.h:124:25: note: expanded from macro 'CONTROL'
#define CONTROL         1

I don’t see a good way to use the identifier CONTROL. Being defined as a macro, text substitution replaces it in the C++ code before any of the C++ naming rules kick in. The only hack I can imagine is calling #undef CONTROL at the beginning of your code. But I’d actually advice against it and rather suggest to use a different name for CONTROL in your code because unexpected and hard to debug behavior might occur when removing defines from system headers…

Cheers,
Jakob

thanks,