Dec 092017
Access Quick Silver from Turbo-C. | |||
---|---|---|---|
File Name | File Size | Zip Size | Zip Type |
CLIPTC.DOC | 1604 | 851 | deflated |
LATTICE.BAT | 67 | 51 | deflated |
REVERSE.C | 79 | 51 | deflated |
TESTREV.PRG | 325 | 198 | deflated |
Download File QS-TC.ZIP Here
Contents of the CLIPTC.DOC file
This is just a little example Turbo C program called REVERSE, which
works with Clipper. REVERSE is not a very useful utility, it just shows one way
to use Turbo C with Clipper. After compiling TESTREV ("Clipper TESTREV"),
compile the Turbo program using LATTICE.BAT (found in the ARC with this file,
hopefully) and link with:
LINK TESTREV+REVERSE,,,{drive/path}CL
....CL, of course, refers to the large model C library from Turbo C and
{drive/path} refers to its location.
REVERSE just reverses a string. Notice that it calls the library function
STRREV(). Other library functions may not work as well, as some of them
(printf for example) look for global variables found in the startup code. I have
no doubt that these variables could be declared in such a way as to "fool"
printf, but that's gonna take some work. A more serious restriction is that
some of the library functions (floating point esp.) will not work since their
segment names and classes evidently conflict with those used by Lattice. I
imagine that recompiling the libraries with LATTICE.BAT would cure most or all
of these problems, but I don't have the source yet.
LATTICE.BAT changes the names and classes of some of the segments produced by
Turbo C with command-line options. It also turns off underbar generation, so
to call library routines you must affix a preceding underbar.
This technique and others will be discussed at more length in a series of
articles in Data Based Advisor (probably September, October, and November of
1987).
R. Russell Freeland
Compuserve 76146,371
7/24/87
works with Clipper. REVERSE is not a very useful utility, it just shows one way
to use Turbo C with Clipper. After compiling TESTREV ("Clipper TESTREV"),
compile the Turbo program using LATTICE.BAT (found in the ARC with this file,
hopefully) and link with:
LINK TESTREV+REVERSE,,,{drive/path}CL
....CL, of course, refers to the large model C library from Turbo C and
{drive/path} refers to its location.
REVERSE just reverses a string. Notice that it calls the library function
STRREV(). Other library functions may not work as well, as some of them
(printf for example) look for global variables found in the startup code. I have
no doubt that these variables could be declared in such a way as to "fool"
printf, but that's gonna take some work. A more serious restriction is that
some of the library functions (floating point esp.) will not work since their
segment names and classes evidently conflict with those used by Lattice. I
imagine that recompiling the libraries with LATTICE.BAT would cure most or all
of these problems, but I don't have the source yet.
LATTICE.BAT changes the names and classes of some of the segments produced by
Turbo C with command-line options. It also turns off underbar generation, so
to call library routines you must affix a preceding underbar.
This technique and others will be discussed at more length in a series of
articles in Data Based Advisor (probably September, October, and November of
1987).
R. Russell Freeland
Compuserve 76146,371
7/24/87
December 9, 2017
Add comments