Type Casting/Conversion
Dizzy
Posts: 9
Hello again,
I'm modifying some code where I need to store the value from a byte into a long. I suppose I could do this with shifts and the like but is there a simpler way? I've tried for instance: LONG[noparse][[/noparse]v126] := BYTE[noparse][[/noparse]packet1]
I can't tell if that works or not.. according to my test program it doesn't haha. Is there an easier cast or a simple trick that anyone knows who has run into this?
Thanks,
D.
I'm modifying some code where I need to store the value from a byte into a long. I suppose I could do this with shifts and the like but is there a simpler way? I've tried for instance: LONG[noparse][[/noparse]v126] := BYTE[noparse][[/noparse]packet1]
I can't tell if that works or not.. according to my test program it doesn't haha. Is there an easier cast or a simple trick that anyone knows who has run into this?
Thanks,
D.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.