On 2012-09-12 00:12, js.mdnq <[email protected]> wrote:

struct bbyte {
byte value;
...
}

bbyte a; bbyte b;

b = a + b; // uses bbyte's operators and casts to do the computation and assignment but then returns a bbyte instead of an int.

You should have no problems implicitly converting bbyte to built in types or built in types to bbyte.

Not entirely true. Converting from bbyte to built-in works, but these
are to my knowledge currently impossible:

void foo(bbyte b);
byte b;

foo(b); // No conversion.


bbyte bar( ) {
    byte b;
    return b;
}


--
Simen

Reply via email to