home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / xbase / library / clipper / cliptc / cliptc.doc next >
Text File  |  1987-07-24  |  2KB  |  30 lines

  1. This is just a little example Turbo C program called REVERSE, which
  2. works with Clipper.  REVERSE is not a very useful utility, it just shows one way
  3. to use Turbo C with Clipper.  After compiling TESTREV ("Clipper TESTREV"), 
  4. compile the Turbo program using LATTICE.BAT (found in the ARC with this file, 
  5. hopefully) and link with: 
  6. LINK TESTREV+REVERSE,,,{drive/path}CL
  7. ....CL, of course, refers to the large model C library from Turbo C and
  8. {drive/path} refers to its location.
  9.  
  10. REVERSE just reverses a string.  Notice that it calls the library function
  11. STRREV().  Other library functions may not work as well, as some of them
  12. (printf for example) look for global variables found in the startup code. I have
  13. no doubt that these variables could be declared in such a way as to "fool" 
  14. printf, but that's gonna take some work.  A more serious restriction is that
  15. some of the library functions (floating point esp.) will not work since their
  16. segment names and classes evidently conflict with those used by Lattice.  I
  17. imagine that recompiling the libraries with LATTICE.BAT would cure most or all
  18. of these problems, but I don't have the source yet.
  19.  
  20. LATTICE.BAT changes the names and classes of some of the segments produced by
  21. Turbo C with command-line options.  It also turns off underbar generation, so
  22. to call library routines you must affix a preceding underbar.
  23.  
  24. This technique and others will be discussed at more length in a series of 
  25. articles in Data Based Advisor (probably September, October, and November of
  26. 1987).
  27.  
  28. R. Russell Freeland
  29. Compuserve 76146,371
  30. 7/24/87