[Gambas-user] 16 bit value in hex with MSB and LSB?

alexchernoff alexchernoff at ...67...
Thu May 18 11:28:53 CEST 2017


Good day all,

In a serial string I receive a 16 bit value split into MSB and LSB in hex,
for example 15000 (3A 98) is sent as 2 bytes containing decimal values  of
3A and 98.

To convert that to decimal, I have to convert each to hex strings, join
them, add &H to it and then convert "&H3A98" to decimal. 

Maybe there is an easier way? 

Thanks! 





--
View this message in context: http://gambas.8142.n7.nabble.com/16-bit-value-in-hex-with-MSB-and-LSB-tp59029.html
Sent from the gambas-user mailing list archive at Nabble.com.




More information about the User mailing list