next up previous 252
Next: F77_INTEGER_TYPE - Define the type INTEGER
Up: Full Description of F77 Macros
Previous: F77_IMPORT_CHARACTER_ARRAY - Import a CHARACTER array from FORTRAN to C.


F77_IMPORT_CHARACTER_ARRAY_P - Import a FORTRAN CHARACTER array to a C array of pointers to char.

Description:
The FORTRAN array will be copied to the series of C strings pointed at by the elements of the C array of pointers. If there is room (determined by the given maximum string length) strings will be null-terminated. Any required changes to the data will be made.

Invocation:
F77_IMPORT_CHARACTER_ARRAY_P(farg,len_f,carg,len_c,nels)

Arguments:

farg
A pointer to the FORTRAN array
len_f
The length of each element of the FORTRAN array
carg
A pointer to the C array
len_c
The maximum length of the C strings, including terminating null if required.
nels
The number of elements to be exported

Examples:

F77_IMPORT_CHARACTER_ARRAY_P(farg,lf,carg,lc,nels)
will expand as follows:

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


Associated macro:
F77_EXPORT_CHARACTER_ARRAY_P



next up previous 252
Next: F77_INTEGER_TYPE - Define the type INTEGER
Up: Full Description of F77 Macros
Previous: F77_IMPORT_CHARACTER_ARRAY - Import a CHARACTER array from FORTRAN to C.

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