Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Changed STR09-EX0 to STR09-EX1

...

In this example, the specific check is enforced using compliant operations on character expressions.:

Code Block
bgColor#CCCCFF
langc
char ch = 't';
if ((ch == 'a') || (ch == 'b') || (ch == 'c')) {
  /* ... */
}

Exceptions

STR09-EX0EX1: Consecutive values for characters like a~z can be assumed on platforms where ASCII or Unicode is used. This recommendation is primarily concerned with platform portability, for example, if code is migrated from ASCII systems to non-ASCII systems.

...