Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#ffcccc
langc
/* ... */
if (age >= 18) {
   /* Take action. */
}
else {
  /* Take a different action. */
}
/* ... */

Compliant Solution

...

Code Block
bgColor#ccccff
langc
enum { ADULT_AGE=18 };
/* ... */
if (age >= ADULT_AGE) {
   /* Take action. */
}
else {
  /* Take a different action. */
}
/* ... */

Noncompliant Code Example

...