Math Library (Floating Point) Routine compatibility

The Summer '87 and Clipper 5 versions of Clipper both use the MSC
Alternate Math routines for Floating Point Routines. These
routines were chosen because they were faster than the Emulator
routines in the MSC 5.x products. This is the reason you must
compile all C modules with the /FPa (Floating Point alternate)
switch. If your code calls any run-time library routines you must
link in the MSC library LLIBCA. This library supports the large
memory model and includes the alternate floating point support
routines.

Because of the differences in the design and implementation of the
alternate floating point routines between vendors, only Microsoft C
supports the use C floating point routines with Clipper.
This causes incompatibilities to arise between the floating point
routines intrinsic in Clipper and those that would be brought in by
any non-Microsoft library.

Library routines that access the Math Library

The library routines that automatically call floating point
routines are as follows.

Math routines

Obviously the math library routines use the floating point
math support routines. Also, any use of the float or
double variable types will cause the inclusion of the
floating point routines. Less obvious are the functions
that can accept these variable types as parameters (such
as printf which could be passed a float or a double.) They
can also cause the math routines to be included.

Graphics Library routines

Most of the graphics drawing routines use floating point
routines to determine the position of the pixels along a
line or arc. The basic routines for getting or setting the
video mode, changing video pages, or changing cursor
positions do not use floating point.

Library Routines in General

The best way to ensure your C code will be compatible with Clipper is
to avoid the use of the run-time library routines all together. Many
times the use of a library routine could be avoided all together, if
it was thought to be important. Many of these routines (low level
file I/O for example) can be easily implemented using DOS or BIOS
interrupt calls. The best situation is one where you do not have to
link in the C run-time library at all. While this is not always
possible, it is worth being aware of.

If you are linking with a C library, be sure to list the Clipper
libraries on the link line first. This is important because the
automatic search request that RTLink performs to find the Clipper
libraries is performed AFTER libraries on the link line are searched.
This means you may accidently replace some of Clipper's low level
functions with versions from the C library - which may not be
compatible. The linker command line RTLINK FI Foo LIB LLIBCA the
linker will search LLIBCA.LIB before CLIPPER.LIB, but the line
RTLINK FI Foo LIB CLIPPER, EXTEND, TERMINAL, DBFNTX, LLIBCA will
not.