On Fri, 2006-05-19 at 15:21 -0600, Stephen Ward wrote: > >> I haven't looked at the spec to see what exactly > >> causes the bytes to get promoted to ints, but they > >> do. It's probably the fact that a literal number is > >> interpreted as an int, not a byte, so byteval << intval > >> causes the byte to be promoted to an int. > > Actually, I believe the << operator promotes each of its operands to ints.
Is this not a bad thing? I definitely wouldn't want a number I'm shifting to be casted to an int as that can change the meaning of the shift. But Java doesn't have unsigned numbers, right? I'll add that to my list of reasons to dislike Java. Michael > > /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
