cnfExprta

Export a C string array to a FORTRAN CHARACTER array

Description:

Export a C string array 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

cnfExprta( source_c, source_len, dest_f, dest_len, ndims, dims )

Arguments

const char source_c (Given)
A pointer to the input C array
int source_len (Given)
The maximum number of characters in a string of the C array (including terminating null if required). This would be the last declared dimension of a char array.
char dest_f (Returned via pointer)
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 FORTRAN array
const int dims (Given)
A pointer to a 1-D array specifying the dimensions of the FORTRAN array.

Notes:

The C array is treated as an array of strings but it will actually be an array of char with one more dimension than the FORTRAN array, the last dimension being source_len. The other dimensions must be as for the FORTRAN array.