Java Reference
In-Depth Information
}
The lesson of this puzzle is that mixed-type computations can be confusing, more so given that hex
and octal literals can take on negative values without an explicit minus sign. To avoid this sort of
difficulty, it is generally best to avoid mixed-type computations. For language designers, it is
worth considering support for unsigned integral types, which eliminate the possibility of sign
extension. One might argue that negative hex and octal literals should be prohibited, but this would
likely frustrate programmers, who often use hex literals to represent values whose sign is of no
significance.
< Day Day Up >
 
 
Search WWH ::




Custom Search