|Beijer Electronics (formerly QSI Corporation)
|Floating point to byte stream
|Page 1 of 1|
|Author:||kkwon [ Tue May 29, 2012 1:59 pm ]|
|Post subject:||Floating point to byte stream|
What is the easiest way to convert a 32-bit floating point variable to a four byte equivalent to be transmitted in a byte stream?
|Author:||Ron L. [ Tue May 29, 2012 8:58 pm ]|
|Post subject:||Re: Floating point to byte stream|
Using the function "GetBytes".
The code might look something like this.
dim f as float
transmit(COM1, GetBytes(f, true), false)
|Page 1 of 1||All times are UTC - 7 hours|
|Powered by phpBB® Forum Software © phpBB Group