...
| Code Block | ||||
|---|---|---|---|---|
| ||||
enum { END_OF_FILE = -1 };
/* ... */
if (getchar() != END_OF_FILE) {
/* ... */
}
|
Exceptions
PRE02-C-EX1: A macro that expands to a single identifier or function call is not affected by the precedence of any operators in the surrounding expression, so its replacement list need not be parenthesized.
| Code Block |
|---|
#define MY_PID getpid() |
PRE02-C-EX2: A macro that expands to an array reference using the array-subscript operator [], or an expression designating a member of a structure or union object using either the member-access . or -> operators is not affected by the precedence of any operators in the surrounding expression, so its replacement list need not be parenthesized.
...