B
Ben Taylor
Hi,
I know that when I use #define statements, the
preprocessor goes and replaces instances of where I have
used the definitions with what they are defined as, but my
question today is does it evaluate them first (if they
don't rely on variables)?
For instance if I have #define WHITE RGB(255, 255, 255)
does it simply replace instances of the word 'WHITE'
with 'RGB(255, 255, 255)' or does the preprocessor
actually run the RGB macro to work out what the *result*
of RGB(255, 255, 255) is and send that to the compiler?
I know that when I use #define statements, the
preprocessor goes and replaces instances of where I have
used the definitions with what they are defined as, but my
question today is does it evaluate them first (if they
don't rely on variables)?
For instance if I have #define WHITE RGB(255, 255, 255)
does it simply replace instances of the word 'WHITE'
with 'RGB(255, 255, 255)' or does the preprocessor
actually run the RGB macro to work out what the *result*
of RGB(255, 255, 255) is and send that to the compiler?