vault backup: 2024-11-10 21:01:06
This commit is contained in:
parent
081dfe7116
commit
5fee60ba7b
@ -35,4 +35,8 @@ Output if DEBUG is not defined:
|
||||
|
||||
> (c). Explain why the output is different in parts (a) and (b)
|
||||
|
||||
When `DEBUG` is defined, any instances of the `PRINT_DEBUG` token are replaced with a `printf` call during compile time, but when it's not defined, they're replaced with nothing.
|
||||
When `DEBUG` is defined, any instances of the `PRINT_DEBUG` token are replaced with a `printf` call during compile time, but when it's not defined, they're replaced with nothing.
|
||||
|
||||
> (d). Is it necessary for the `DEBUG` macro to be defined *before* `debug.h` is included in order for `PRINT_DEBUG` to have the desired effect? Justify your answer.
|
||||
|
||||
Macro invocations are evaluated sequentially, and so if `DEBUG` was defined after `PRINT_DEBUG`, then any usages of `PRINT_EVALUATION` would be have like `DEBUG` was not defined.
|
Loading…
Reference in New Issue
Block a user