sa*****@yahoo.c o.in wrote:
>
>>#define status "23"
#define status "44"
What did you expect to see?
i expect first statement to replace status of second statement with
23, so it would be
#define "23" "43"...
There are a few places that macro substitution of preprocessing tokens
doesn't occur. The following are some (there may be others):
1. identifier following #define and #undef
2. argument names in a function-like macro definition
3. identifier following #ifdef and #ifndef
4. identifier following defined operator in #if, #elif statement
5. identifiers following #error
6. identifiers following #pragma STDC or equivalent _Pragma ("STDC ...")
operator (C99 only)
7. inside string literals
8. inside character constants
9. inside h-character-sequence and q-character-sequence (within <and
"") on #include line
10. identifiers in skipped text after a false #if
(#elif/#ifdef/#ifndef), including text on the same line after #<pp operator>
11. comments (they don't exist in translation phase 4)
Does anyone know of any other places within the program text that macros
are not expanded?
--
Thad