Hmmm, I did this once, a long long time ago. But that was on a OpenVMS
system. It was fairly easy to do. What you really need is the IEEE
format specification of the bit patterns. Take a look at
http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/ieee-sgl.html
for help in this area.

VB stores all of its single float precision data ast IEEE format 4 byte
chunks. If you have a lot of this data, I would consider using a simple
VB app to do the transformation. This sort of bit banging in CF will
be CPU intensive, at the very least.

Steve

At 12:24 PM 6/28/2000 -0500, Brandon Whitaker wrote:
>Here's one for the cadre of real programmers, of whom I'm not a member:
>
>I have a string of information - partially binary, partially ASCII - that
>represents a number of reads from an electric meter.  The site name, dates,
>etc. are stored in ASCII; record length & type designators in 2-byte binary
>integers; and interval data is stored in 4-byte IEEE floating point.
>
>I read this datafile in, using Lewis Sellers' ([EMAIL PROTECTED])
>excellent CFX_binaryR tag, and process arrays of the resulting bytes for
>display based on an ISO-standard datafile format.
>
>Problem: Floating point conversion.  The ASCII is trivial (#chr(byte)#); and
>I wrote a custom tag that converts the 2-byte binInts to decimal (anyone
>interested?) - but the floating-point-to-decimal conversion has me pulling
>out the remains of my already-endangered hair.
>
>Anyone have any pointers on this?  CFX tags, formulae, anything?
>
>TIA...
>
>Brandon Whitaker
>[EMAIL PROTECTED]
>-------
>"It'll get used by the same people using Opera.  People dressed in black
>wearing berets."
>- Dave Watts, on Mozilla
>"The net interprets censorship as damage and routes around it."
>- John Gilmore
>"I'm sorry, I can't hear you.  God just sat on my Whoopee Cushion."
>- Kibo
>
>
>---------------------------------------------------------------------------
---
>Archives: http://www.eGroups.com/list/cf-talk
>To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>

--
Stephen Garrett
GPS
[EMAIL PROTECTED]           (360) 896-2714
ICQ# 10776767
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to