The result is then the same as the operands. Each operator in an expression is evaluated independently. For example:
i32 = i16 - (i8 + i8)
The + operator is 8 bit, the result is converted to 16 bit after the addition and the - is 16 bit, that result is converted to 32 bit and the assignment is done. Note that if i8 is 200 and i16 is 400 then the result in i32 is 256. (200 plus 200 is 144 with a 8 bit +)
Explicit conversion may be done at any point with (type) inserted before the expression to be converted. For example in the above the perhaps desired effect may be achieved by doing:
i32 = i16 - ((long)i8 + i8)
In this case the first i8 is converted to 16 bit, then the add is a 16 bit add and the second i8 is forced to 16 bit.
Hola, creo que declarando a la constante 1024 por 1024UL lo solucionas.
Saludos !
Hola, en esto el CCS se comporta como el ANSI, lo que decia es que no es necesario castear cada miembro, en el caso bastaria con castear la constante de esta manera:Código: C
pNext_EVENT_Location = ( IdWide ++ ) * 1024UL;
Por lo menos en ANSI debería funcionar.
Saludos !
pNext_EVENT_Location = ( ++IdWide ) * 1024UL;