Integer variables are frequently intended to represent either a numeric value or a bit collection. Numeric values must be exclusively operated on using arithmetic operations, while bit collections should be exclusively operated on using logical bitwise operations. However, static analyzers are frequently unable to determine the intended use of a particular integer variableBitwise operators include the unary operator ~ and the binary operators <<
, >>
, >>>
, &
, ^, and |
.
Performing bitwise and arithmetic operations on the same data indicates confusion regarding can obscure the purpose of the data stored in the variable. Unfortunately, bitwise operations are frequently performed on arithmetic values as a form of premature optimization. Bitwise operators include the unary operator ~ and the binary operators <<
, >>
, >>>
, &
, ^, and |
. Although such operations are valid and will compile, they can reduce code readability.
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="45a94229955e43ef-6f1d1529-4896495b-9c64a2dd-496289c5396cf1043f020303"><ac:plain-text-body><![CDATA[ | [[Steele 1977 | AA. References#Steele 1977]] | ]]></ac:plain-text-body></ac:structured-macro> |
...