...
Code Block | ||||
---|---|---|---|---|
| ||||
/* ... */ if (age >= 18) { /* Take action. */ } else { /* Take a different action. */ } /* ... */ |
Compliant Solution
...
Code Block | ||||
---|---|---|---|---|
| ||||
enum { ADULT_AGE=18 }; /* ... */ if (age >= ADULT_AGE) { /* Take action. */ } else { /* Take a different action. */ } /* ... */ |
Noncompliant Code Example
...