next up previous 252
Next: F77_FREE_type - Free a dynamic variable of type
Up: Full Description of F77 Macros
Previous: F77_EXPORT_type - Export a C variable to a FORTRAN variable.


F77_EXPORT_type_ARRAY - Export an array of type from C to FORTRAN

Description:
Depending upon the type and system, the C array will be copied to the FORTRAN array, making any required changes to the data, or the pointer to the FORTRAN array will be set to point to the C array. (type not CHARACTER.)

Invocation:
F77_EXPORT_type_ARRAY(carg,farg,nels)

Arguments:

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

Examples:

F77_EXPORT_type_ARRAY(farg,carg,nels)
type LOGICAL will expand as follows:

All systems: {int f77dims[1];f77dims[0]=nels;
  cnfExpla(carg,farg,1,f77dims);}

type POINTER will expand as follows:

All systems: {int f77i; for(f77i=0;nels>f77i;f77i++) {
  farg[f77i]=cnfFptr(carg[f77i]); }}

All other types will expand as follows:

All systems: farg=carg


Associated macro:
F77_EXPORT_CHARACTER_ARRAY



next up previous 252
Next: F77_FREE_type - Free a dynamic variable of type
Up: Full Description of F77 Macros
Previous: F77_EXPORT_type - Export a C variable to a FORTRAN variable.

CNF and F77 Mixed Language Programming -- FORTRAN and C
Starlink User Note 209
P.M. Allan
A.J. Chipperfield
R.F. Warren-Smith
19 January 2000
E-mail:ussc@star.rl.ac.uk