Next: cnfExprtap - Export a C array of pointers to char, to a FORTRAN CHARACTER array
Up: CNF C Routine Descriptions
Previous: cnfExprt - Export a C string to a FORTRAN string
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.
Next: cnfExprtap - Export a C array of pointers to char, to a FORTRAN CHARACTER array
Up: CNF C Routine Descriptions
Previous: cnfExprt - Export a C string to a FORTRAN string
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