cnfExprtap

Export a C array of pointers to char, to a FORTRAN CHARACTER array

Description:

Export a C array of pointers to char to a FORTRAN CHARACTER array. A null character is assumed to terminate each C string – it will not be copied. If the C string is shorter than the space allocated to the FORTRAN string, then pad it with blanks. No more than ‘dest_len’ characters will be copied for each string.

Invocation

cnfExprtap( source_c, dest_f, dest_len, ndims, dims )

Arguments

char const source_c (Given)
A pointer to the input C array of pointers to char
char dest_f
A pointer to the output FORTRAN array
int dest_len (Given)
The declared maximum number of characters in a element of the FORTRAN array
int ndims (Given)
The number of dimensions of the arrays
const int dims (Given)
A pointer to a 1-D array specifying the dimensions of the arrays.

Notes:

The array of pointers to char is assumed to point to null-terminated strings. The dimensions of the array of pointers and the FORTRAN character array must be the same.

Strictly, the input array should be declared as ‘const char const source_c’, but this would not allow non-constant char to be given.