F77_IMPORT_
type_ARRAY
Import an array of
type from FORTRAN to C
Description:
Depending upon the type and system, the
FORTRAN array will be copied to the C array, making any required changes to the data, or the pointer
to the C array will be set to point to the FORTRAN array. (type not CHARACTER.)
Invocation
F77_IMPORT_type_ARRAY(farg,carg,nels)
Arguments
farg
A pointer to the FORTRAN
array
carg
A pointer to the C array
nels
The number of elements to be exported
Examples:
F77_IMPORT_type_ARRAY(carg,farg,nels)
type LOGICAL will expand as
follows:
All systems: | { int f77dims[1];f77dims[0]=nels; |
| cnfImpla(farg,carg,1,f77dims);} |
type POINTER will expand as follows:
All systems: | { int f77i;for(f77i=0;nels>f77i;f77i++){ |
| carg[f77i]=cnfCptr(farg[f77i]); }} |
All other types will expand as follows:
Associated macro: