home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!jvnc.net!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!torn!watserv2.uwaterloo.ca!watmath!thinkage!atbowler
- From: atbowler@thinkage.on.ca (Alan Bowler)
- Subject: Re: Convert COBOL COMP-3 to double?
- Message-ID: <1992Aug31.174651.14828@thinkage.on.ca>
- Organization: /etc/organization
- References: <1992Aug26.151021.4445@afs.com>
- Date: Mon, 31 Aug 1992 17:46:51 GMT
- Lines: 15
-
- In article <1992Aug26.151021.4445@afs.com> jack@afs.com (Jack Brasch) writes:
- >Could someone point me in the right direction or mail me a routine to
- >convert COBOL COMP-3 types to a double.
- >
-
- The starting point would be the Cobol programmer's guide for your
- particular Cobol implementation. Somewhere in there it should tell you
- exactly what COMP-3 is for that Cobol implementation. The starnadrds
- only say that you can do arithemetic on comp-N items. What the -N
- produces on your hardware varies with every Cobol compiler. It is not
- unlikely that comp-N means different things to different compilers on
- the SAME hardware. (I have seen this several times.) When you know
- what the hardware is doing with comp-3 on this Cobol compiler, figuring
- out how to convert to a C double should be straight forward. At worse
- you can move it to a DISPLAY item, and let the C code call strtod().
-