byte & byte

Ellery Newcomer ellery-newcomer at
Thu Oct 28 08:17:28 PDT 2010

Next question:

why does

(~ short) result in short, but in c it results in int?

On 10/27/2010 11:02 PM, Steven Schveighoffer wrote:
> Well, if 'int' represents a literal, or a manifest constant, they are
> not exactly ints. When the compiler can tell that the result of the
> operation will fit into a byte, it allows it to go through. I believe
> when it can't tell, it should error, but &= may be a special case, I'm
> not sure.
> -Steve

More information about the Digitalmars-d-learn mailing list