D Classified List of F77 Macros

 D.1 Declaration of a C Function
 D.2 Arguments of a C Function
 D.3 Generate Pointers to Arguments
 D.4 Data Type Macros
 D.5 Logical Value Macros
 D.6 External Name Macro
 D.7 Common Block Macros
 D.8 Declaring Variables for Passing to a FORTRAN Routine
 D.9 Importing and Exporting Arguments
 D.10 Passing Arguments to a FORTRAN Routine
 D.11 Thread Safety

This appendix contains a list of the F77 macros, arranged by functionality.

D.1 Declaration of a C Function

type may be one of: CHARACTER, DOUBLE, INTEGER, LOGICAL, REAL, BYTE, WORD, UBYTE, UWORD or POINTER.

F77_type_FUNCTION

  Declare a FORTRAN-callable function that returns a value of the specified type

F77_SUBROUTINE

  Declare a FORTRAN-callable SUBROUTINE

D.2 Arguments of a C Function

type may be one of: CHARACTER, DOUBLE, INTEGER, LOGICAL, REAL, BYTE, WORD, UBYTE, UWORD or POINTER.

type

  Declare a C function argument of the specified type

type_ARRAY

  Declare a C function argument as an array of the specified type

type_FUNCTION

  Declare a C function argument as a FORTRAN-callable FUNCTION of the specified type

CHARACTER_RETURN_VALUE

  Declare an argument that will be the return value of a CHARACTER FUNCTION

SUBROUTINE

  Declare a C function argument as a FORTRAN-callable SUBROUTINE name

TRAIL

  Declare hidden trailing arguments

D.3 Generate Pointers to Arguments

type may be one of: CHARACTER, DOUBLE, INTEGER, LOGICAL, REAL, BYTE, WORD, UBYTE, UWORD or POINTER.

GENPTR_type

  Generate a pointer to an argument of the specified type

GENPTR_type_ARRAY

  Generate a pointer to an array argument of the specified type

GENPTR_type_FUNCTION

  Generate a pointer to an argument which is a FORTRAN-callable FUNCTION of the specified type

GENPTR_SUBROUTINE

  Generate a pointer to an argument which is a FORTRAN-callable SUBROUTINE

D.4 Data Type Macros

F77_BYTE_TYPE

  Define the C type corresponding to the FORTRAN type BYTE

F77_CHARACTER_TYPE

  Define the C type corresponding to the FORTRAN type CHARACTER

F77_DOUBLE_TYPE

  Define the C type corresponding to the FORTRAN type DOUBLE PRECISION

F77_INTEGER_TYPE

  Define the C type corresponding to the FORTRAN type INTEGER

F77_LOGICAL_TYPE

  Define the C type corresponding to the FORTRAN type LOGICAL

F77_POINTER_TYPE

  Define the C type corresponding to the type POINTER

F77_REAL_TYPE

  Define the C type corresponding to the FORTRAN type REAL

F77_UBYTE_TYPE

  Define the C type corresponding to the type UBYTE

F77_UWORD_TYPE

  Define the C type corresponding to the type UWORD

F77_WORD_TYPE

  Define the C type corresponding to the type WORD

D.5 Logical Value Macros

F77_FALSE

  The FORTRAN logical value FALSE

F77_ISFALSE

  Is this the FORTRAN logical value false?

F77_ISTRUE

  Is this the FORTRAN logical value true?

F77_TRUE

  The FORTRAN logical value TRUE

D.6 External Name Macro

F77_EXTERNAL_NAME

  The external name of a function

D.7 Common Block Macros

F77_BLANK_COMMON

  Refer to blank common

F77_NAMED_COMMON

  Refer to a named common block

D.8 Declaring Variables for Passing to a FORTRAN Routine

type may be one of: CHARACTER, DOUBLE, INTEGER, LOGICAL, REAL, BYTE, WORD, UBYTE, UWORD or POINTER.

DECLARE_type

  C declaration of a FORTRAN variable of the specified type

DECLARE_type_ARRAY

  C declaration of a FORTRAN array of the specified type

DECLARE_type_ARRAY_DYN

  C declaration of a dynamic FORTRAN array of the specified type

F77_CREATE_type_ARRAY

  Create a dynamic FORTRAN array of type

DECLARE_CHARACTER_DYN

  C declaration of a dynamic FORTRAN CHARACTER variable

F77_CREATE_CHARACTER

  Create a dynamic FORTRAN CHARACTER variable

F77_CREATE_CHARACTER_ARRAY

  Create a dynamic FORTRAN CHARACTER 1-D array

F77_CREATE_CHARACTER_ARRAY_M

  Create a dynamic FORTRAN CHARACTER n-D array

F77_CREATE_LOGICAL_ARRAY_M

  Create a dynamic FORTRAN LOGICAL n-D array

F77_FREE_type

  Free a dynamic FORTRAN array or CHARACTER variable

D.9 Importing and Exporting Arguments

type may be one of: CHARACTER, DOUBLE, INTEGER, LOGICAL, REAL, BYTE, WORD, UBYTE, UWORD or POINTER.

F77_EXPORT_type

  Export a C variable to a FORTRAN variable of type

F77_EXPORT_type_ARRAY

  Export a C array to a FORTRAN array of type

F77_EXPORT_CHARACTER_ARRAY_P

  Export an array of pointers to char to a FORTRAN CHARACTER array

F77_IMPORT_type

  Import a FORTRAN variable of type to a C variable

F77_IMPORT_type_ARRAY

  Import a FORTRAN array of type to a C array

F77_IMPORT_CHARACTER_ARRAY_P

  Import a FORTRAN CHARACTER array to a C array of pointer to char

F77_ASSOC_type_ARRAY

  Associate a FORTRAN array of type with a C array

D.10 Passing Arguments to a FORTRAN Routine

type may be one of: CHARACTER, DOUBLE, INTEGER, LOGICAL, REAL, BYTE, WORD, UBYTE, UWORD or POINTER.

type_ARG

  Pass an argument of the specified type to a FORTRAN routine

type_ARRAY_ARG

  Pass an array argument of the specified type to a FORTRAN routine

type_FUNCTION_ARG

  Pass a FORTRAN-callable FUNCTION of the specified type as an argument to a FORTRAN routine

CHARACTER_RETURN_ARG

  Pass an argument that will be the return value of a CHARACTER FUNCTION

F77_CALL

  Call a FORTRAN routine from C

SUBROUTINE_ARG

  Pass a FORTRAN-callable SUBROUTINE name as an argument to a FORTRAN routine

TRAIL_ARG

  Pass the length of a CHARACTER argument to a FORTRAN routine

D.11 Thread Safety

F77_LOCK

  Prevents code from being run simultaneously in two separate threads