...
In this example, the specific check is enforced using compliant operations on character expressions.:
Code Block | ||||
---|---|---|---|---|
| ||||
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.
...