Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

fortran.h

00001 #ifndef FORTRAN_FROM_CPLUSPLUS
00002 #define FORTRAN_FROM_CPLUSPLUS
00003 /*
00004     Definitions for calling FORTRAN 77 from C++
00005     ===========================================
00006     Author: Carsten Arnholm, 25-AUG-1995  (first Windows NT impl.)
00007     Rev1  : Carsten Arnholm, 21-DEC-1995  (Unix updates)
00008     Rev2  : Carsten Arnholm, 03-MAR-1996  (f77cmplx.h, f77matrx.h)
00009    */
00010 
00011 typedef int     INTEGER;          // INTEGER              4 bytes
00012 typedef float   REAL;             // REAL                 4 bytes
00013 typedef double  DOUBLE_PRECISION; // DOUBLE PRECISION     8 bytes
00014 typedef int     LOGICAL;          // LOGICAL              4 bytes
00015 
00016 #include "f77char.h"             // character            n bytes
00017 //#include  <f77cmplx.h>            // complex
00018 #include "f77matrix.h"            // fmatrix class
00019 
00020 
00021 // values for LOGICAL
00022 #define FALSE 0
00023 #define TRUE  1
00024 
00025 #define F77_STUB_REQUIRED
00026 
00027 // Macros for portable handling of linkage & calling conventions
00028 #ifdef F77_STUB_REQUIRED
00029 // Typically, this branch is for Unix computers
00030 
00031       // C++ stub functions:
00032 #define SUBROUTINE                    inline void
00033 #define INTEGER_FUNCTION              inline INTEGER
00034 #define REAL_FUNCTION                 inline REAL
00035 #define LOGICAL_FUNCTION              inline LOGICAL
00036 #define DOUBLE_PRECISION_FUNCTION     inline DOUBLE_PRECISION
00037 
00038 // FORTRAN functions
00039 #define SUBROUTINE_F77                extern "C" void
00040 #define INTEGER_FUNCTION_F77          extern "C" int
00041 #define REAL_FUNCTION_F77             extern "C" float
00042 #define LOGICAL_FUNCTION_F77          extern "C" int
00043 #define DOUBLE_PRECISION_FUNCTION_F77 extern "C" double
00044 #else
00045 // MS Windows using Microsoft compilers
00046 
00047 
00048 // FORTRAN functions
00049 #define SUBROUTINE            extern "C" void           __stdcall
00050 #define INTEGER_FUNCTION      extern "C" INTEGER        __stdcall
00051 #define REAL_FUNCTION         extern "C" REAL           __stdcall
00052 #define LOGICAL_FUNCTION      extern "C" LOGICAL        __stdcall
00053 #define DOUBLE_PRECISION_FUNCTION extern "C" DOUBLE_PRECISION \
00054                                                               __stdcall
00055 
00056 #endif
00057 
00058 
00059 
00060 
00061 
00062 #endif

Generated on Wed Oct 5 14:28:55 2005 for FlowDesigner by  doxygen 1.4.4