F77_CREATE_type_ARRAY

Create an array of type.

F77_CREATE_type_ARRAY Create an array of type.

Description:

These macros ensure that memory is available for arrays to be used as actual arguments for FORTRAN subroutines, assuming that space is already allocated for a corresponding C array. That is, they will only allocate additional memory for those types which require a non-null export or import. (type not CHARACTER or LOCATOR.)

Invocation

F77_CREATE_type_ARRAY(farg,nels)

Arguments

carg
A pointer to the C array
farg
A pointer to the FORTRAN array
nels
The number of elements required

Examples:

F77_CREATE_type_ARRAY(farg,n)
type LOGICAL will expand as follows:
All systems: {int f77dims[1];f77dims[0]=n;
farg=cnfCrela(1,f77dims);}

type POINTER will expand as follows:

All systems: farg=
(F77_POINTER_TYPE *)malloc(n*sizeof(F77_POINTER_TYPE))

All other types (except CHARACTER) will expand as follows:

All systems:

Associated macros:

F77_CREATE_CHARACTER_ARRAY, F77_ASSOC_type_ARRAY, F77_EXPORT_type_ARRAY,
F77_IMPORT_type_ARRAY