Always remember that the type on the left side of the '=' has nothing to do with how the right side of the '=' is evaluated. That's why "long foo = 1000 * 1000;" is not the same as "long foo = 1000000;". In the first one, you get an overflow with 16-bit integers and with the second the compiler knows you mean '1000000L' because '1000000' won't fit in a 16-bit 'int'.