Download User's Guide

Transcript
Item ucs_07
Items Enforced
Item ucs_07
Do not use the ?: operator
Using the ?: operator can make your code more difficult for others to
read and understand. CodeWizard can detect if you use the ?: operator.
This error is reported as violations of Item ucs_07.
Reason for rule: The ?: operator is difficult to read and leads to code
obfuscation.
Note: This item is suppressed by default.
Example
1: /*
2:
* UCS item 07 - Do not use the ?: operator
3:
* /
4: int main()
5: {
6:
return (1 ? 1 : 0); // UCS07 Violation
7: };
CodeWizard Output
[ucs07.C:7] Avoid using the ?: operator
Violation: Universal Coding Standards item 7
144