how to look at binary variables

marty at ucls.uchicago.edu marty at ucls.uchicago.edu
Mon May 26 18:19:58 EDT 2008


Hi all --

In order to poll a certain device that's on a serial port, I'm supposed to
send it a single byte containing the number 1.  To me, that means
00000001.  How do I put that into a variable and send the variable to the
device?

The documenatation for binaryEncode() and binaryDecode() is confusing me. 
If I put binaryEncode("C1",1) into a variable, that should do it, right? 
How can I see what's really in the variable, how big it is, etc.?

Also, I'll be reading bytes back from the device, and want to look at them
bit by bit.  How can I do that?

Any pointers would be appreciated!

Thanks,
  - marty

--
Marty Billingsley
The University of Chicago Laboratory Schools




More information about the use-livecode mailing list