The statement b = a++ works not because there is an automatic cast, but because a is incremented
as a byte and assigned to b,
which is also a byte.
In the statement i = i + L the cast
is automatic, and it is to a long type. A long won't fit into the int on the left side of the assignment operator, so you have to do an explicit cast to force the issue.
The statement i += L works because of the compound operator; i becomes a long because the largest data type in the expression is a long. I hope this hslps.
[This message has been edited by Barbara Dyer-Bennet (edited September 15, 2000).]