[comp.protocols.iso] Need help on ASN.1 REAL!

ng@eric.mpr.ca (Steve Ng) (08/31/89)

Does anyone have experience of encoding (using BER) ASN.1 REAL type value? 
I found the description in X.209 are very confusing especially the usage of
binary scaling factor F. Can some one tells me how it works? Using an 
example like encoding 2.34567E-03 with a transfer base 2, would be helpful.

Thanks in advance for any help.

Steve.

jpo@computer-science.nottingham.ac.UK (Julian Onions) (09/01/89)

I did a version of this stuff for isode5.4 beta release. It's pretty
horrible stuff all in all. I've no idea if the stuff interworks or if
anyone has tried coding it for any other stack besides ISODE. It
interworks with itself though is the best you can say!

The problem I found is that if you know the hardware form of the
floating point structure, you can probably do a pretty snappy encoding
from machine to BER format. However, try and make it portable and you
have to resort to some really yucky stuff. At one point I comptemplated
just using the library routines to convert a floating point to a string
and then parsing that!  My current solution is not much better though.

Julian.