If I have a piece of code written in C # wrapped in the #if directive, what (if any) priority applies to any logical operators that can be used in this directive?
In other words:
#if DEBUG || MYTEST && PLATFORM_WINDOWS
Will it just be judged left to right as
#if (DEBUG || MYTEST) && PLATFORM_WINDOWS
And similarly,
#if PLATFORM_WINDOWS && DEBUG || MYTEST
Estimated as
#if (PLATFORM_WINDOWS && DEBUG) || MYTEST
Or is there some priority order for && vs ||?
Edit: To be clear, I know well that I can run the code itself to test it, and I have it. I am looking for an answer that gives me something official - a link to documentation or the like, which can give me a deeper understanding of the underlying mechanics of directives. I would like to know if there is a specific intention or if it is pure that which is undefined.
source share