RE: Types... Slate -> C -> Slate conversión

Paul Dufresne dufrp at hotmail.com
Wed Oct 13 18:37:01 PDT 2004


>An other way, around this, for converting two bytes SInt16, to UInt16
>value = 256 * byte[0] + byte[1] ' this concatenates the 2 bytes
>if value < 0
>  then value = - (65536 - value)
65536 is 1 more than all the bits to 1. Or in binary,
1 followed by as many 0 there is bits in the number.

hum, hum, you should have read:
if value > 32767 rather than < 0

--Paul





More information about the Slate mailing list