[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnubol: IBM data format conversion routines



Ted,

Very good code. Well documented and easy to follow. I like this
code.

Would you mind doing some test cases for it even if they are very
basic. Also can you use the header files to ensure that the long
double on the system supports enough range to support the
requirements for conversion. Should blow up on a conditional
compilation (#error) if not. Finally is there any way to get rid
of the static variables which make it not thread safe (eg have
the caller pass the area to copy into).

I guess conversions in the other direction would be more tricky
as you cannot use the FP hardware to build up the numbers for
you, will require bit fiddling but we can leave that until later.

Regards,
Tim Josling

"Theodore J. Seward, Jr." wrote:
> 
> Folks,
> 
> I don't know if this is helpful or not, but I've attached a tar file
> with a small library of conversion routines:
> 
> cnvAtoE - Convert buffer from ASCII to EBCDIC
> cnvEtoA - Convert buffer from EBCDIC to ASCII
> cnvPDtoCH - Convert IBM Packed Decimal to character string (1 to 16
> bytes, 1 to 31 digits)
> cnvSPtoD - Convert IBM Single Precision Floating to C Double (4 bytes)
> cnvDPtoD - Convert IBM Double Precision Floating to C Double (8 bytes)
> cnvXPtoLD - COnvert IBM Extended Precision Floating to C Long Double (16
> bytes)

> 
> Good Luck - Ted Seward



--
This message was sent through the gnu-cobol mailing list.  To remove yourself
from this mailing list, send a message to majordomo@lusars.net with the
words "unsubscribe gnu-cobol" in the message body.  For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@lusars.net.