home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / f2c / f77lib / readme < prev    next >
Text File  |  2000-06-22  |  3KB  |  78 lines

  1. If your compiler does not recognize ANSI C headers,
  2. compile with KR_headers defined:  either add -DKR_headers
  3. to the definition of CFLAGS in the makefile, or insert
  4.  
  5. #define KR_headers
  6.  
  7. at the top of f2c.h .
  8.  
  9.  
  10. If you use a C++ compiler, first create a local f2c.h by appending
  11. f2ch.add to the usual f2c.h, e.g., by issuing the command
  12.     make f2c.h
  13. which assumes f2c.h is installed in /usr/include .
  14.  
  15. If your system lacks onexit() and you are not using an ANSI C
  16. compiler, then you should compile main.c with NO_ONEXIT defined.
  17. See the comments about onexit in the makefile.
  18.  
  19. If your system has a double drem() function such that drem(a,b)
  20. is the IEEE remainder function (with double a, b), then you may
  21. wish to compile r_mod.c and d_mod.c with IEEE_drem defined.
  22.  
  23. To check for transmission errors, issue the command
  24.     make check
  25. This assumes you have the xsum program whose source, xsum.c,
  26. is distributed as part of "all from f2c/src".  If you do not
  27. have xsum, you can obtain xsum.c by sending the following E-mail
  28. message to netlib@research.att.com
  29.     send xsum.c from f2c/src
  30.  
  31. The makefile assumes you have installed f2c.h in a standard
  32. place (and does not cause recompilation when f2c.h is changed);
  33. f2c.h comes with "all from f2c" (the source for f2c) and is
  34. available separately ("f2c.h from f2c").
  35.  
  36. Most of the routines in libF77 are support routines for Fortran
  37. intrinsic functions or for operations that f2c chooses not
  38. to do "in line".  There are a few exceptions, summarized below --
  39. functions and subroutines that appear to your program as ordinary
  40. external Fortran routines.
  41.  
  42. 1.    CALL ABORT prints a message and causes a core dump.
  43.  
  44. 2.    ERF(r) and DERF(d) and the REAL and DOUBLE PRECISION
  45.     error functions (with x REAL and d DOUBLE PRECISION);
  46.     DERF must be declared DOUBLE PRECISION in your program.
  47.     Both ERF and DERF assume your C library provides the
  48.     underlying erf() function (which not all systems do).
  49.  
  50. 3.    ERFC(r) and DERFC(d) are the complementary error functions:
  51.     ERFC(r) = 1 - ERF(r) and DERFC(d) = 1.d0 - DERFC(d)
  52.     (except that their results may be more accurate than
  53.     explicitly evaluating the above formulae would give).
  54.     Again, ERFC and r are REAL, and DERFC and d are DOUBLE
  55.     PRECISION (and must be declared as such in your program),
  56.     and ERFC and DERFC rely on your system's erfc().
  57.  
  58. 4.    CALL GETARG(n,s), where n is an INTEGER and s is a CHARACTER
  59.     variable, sets s to the n-th command-line argument (or to
  60.     all blanks if there are fewer than n command-line arguments);
  61.     CALL GETARG(0,s) sets s to the name of the program (on systems
  62.     that support this feature).  See IARGC below.
  63.  
  64. 5.    CALL GETENV(name, value), where name and value are of type
  65.     CHARACTER, sets value to the environment value, $name, of
  66.     name (or to blanks if $name has not been set).
  67.  
  68. 6.    NARGS = IARGC() sets NARGS to the number of command-line
  69.     arguments (an INTEGER value).
  70.  
  71. 7.    CALL SIGNAL(n,func), where n is an INTEGER and func is an
  72.     EXTERNAL procedure, arranges for func to be invoked when
  73.     signal n occurs (on systems where this makes sense).
  74.  
  75. 8.    CALL SYSTEM(cmd), where cmd is of type CHARACTER, passes
  76.     cmd to the system's command processor (on systems where
  77.     this can be done).
  78.