Posted to tcl by kbk at Sun Feb 27 22:49:14 GMT 2011view raw
- # Input data, as reported by Thomas
- set data [binary format cccc 0x66 0x40 0x7d 0xe9]
- # Get two little-endian shorts from the data
- binary scan $data susu w0 w1
- # Put them back in the opposite sequence, and rescan them as a float
- binary scan [binary format ss $w1 $w0] r floatval
- # Report on the result
- puts $floatval