Main Content
AUTOSAR C++14 Rule A2-13-5
Hexadecimal constants should be uppercase
Description
Rule Definition
Hexadecimal constants should be uppercase.
Rationale
Hexadecimal notation uses digits 0–9 and letters A to F. Using only uppercase alphabetic letters in a hexadecimal constant definition helps keep the source code consistent, readable, and easy to maintain.
A mix of uppercase and lowercase hexadecimal constants might lead to confusion in the development process, which in turn might lead to bugs. Consistently enforcing the exclusive use of uppercase hexadecimal constants reduces this potential issue.
Troubleshooting
If you expect a rule violation but Polyspace® does not report it, see Diagnose Why Coding Standard Violations Do Not Appear as Expected.
Examples
Check Information
Group: Lexical Conventions |
Category: Advisory, Automated |
Version History
Introduced in R2019a