[comp.databases] CLIPPER to TC float, convert, use, convert back?

marwk@levels.sait.edu.au (05/25/91)

It is commonly known that Floating Point with CLIPPER and TURBO C do not mix.

However, is it possible to pass a CLIPPER float to a TC routine, translate
the 4 bytes to TC with bit manipulations, and then use the TC routines, convert
back to CLIPPER float, and finally return those values to the CLIPPER calling
routine?  It may be that the TC FP library still cannot be linked in.

This is probably of general interest, as the compatability of floats
between TC and CLIPPER arises now and then.

Thank you.
Ray

--
University of South Australia   | Plus ca change, plus c'est la meme chose.
P.O. Box 1                      | Ghing thien me how, ming thien gung me how.
Ingle Farm                      | Knobs, knobs everywhere,
South Australia                 |              just vary a knob to think!

tleylan@pegasus.com (Tom Leylan) (05/26/91)

In article <16401.283ef882@levels.sait.edu.au> marwk@levels.sait.edu.au writes:
>It is commonly known that Floating Point with CLIPPER and TURBO C do not mix.
>
>However, is it possible to pass a CLIPPER float to a TC routine, translate
>the 4 bytes to TC with bit manipulations, and then use the TC routines, convert
>back to CLIPPER float, and finally return those values to the CLIPPER calling
>routine?  It may be that the TC FP library still cannot be linked in.
>
>This is probably of general interest, as the compatability of floats
>between TC and CLIPPER arises now and then.
>
Ray,

Clipper uses the Microsoft Alternate math library in so far as I know and
generally Turbo C is considered "incompatible" if you access any floating
point routines.  I use Quick C which is also incompatible if one uses
LLIBCE but Quick C luckily can use MSC 5.01 LLIBCA library so I don't
have a problem.

There was a file for S'87 which explained how one could use Turbo C and
as you suspected it involved futzing with the values passed.  I believe
there were contained in a file generally referred to as CGOODS.ZIP.

I don't know if they would be of use with Clipper 5.01 but possibly they
would.

Now, how can you get a hold of the file ?  If you can't call Nantucket
directly and don't have Compuserve access (the file is on NANFORUM) you
can contact the distributor in Australia.

RCM Software, 51 Through Road, Burwood, Victoria 3125
Tel: 61-3-809-2041   FAX: 61-3-889-0263

Ask for Graham McKechnie or Ron Polak and tell them I sent you.  If they
can't figure out what it is you want, they cacontact me and I'll explain
it.

BTW, I tried to answer some of your mail messages in the past but they
always bounced... so I wasn't ignoring you.

tom