Next: cnfImprtap - Import a FORTRAN CHARACTER array into a C array of pointers to char.
Up: CNF C Routine Descriptions
Previous: cnfImprt - Import a FORTRAN string into a C string
cnfImprta
- Import a FORTRAN CHARACTER array into a C string array.
- Description:
- Import a FORTRAN CHARACTER array into a C string array, discarding
trailing blanks.
The null character is appended to the C string after the last non-blank
character copied from the FORTRAN string if there is room.
No more than `dest_len' characters will be copied for each string.
- Invocation:
- cnfImprta( source_f, source_len, dest_c, dest_len, ndims, dims )
- Arguments:
-
-
const char *source_f (Given)
-
A pointer to the input FORTRAN array
-
int source_len (Given)
-
The declared maximum number of characters in a element of the FORTRAN
array
-
char *dest_c (Returned via pointer)
-
A pointer to the output C array
-
int dest_len (Given)
-
The maximum number of characters in an element of the C array
(including terminating null if required). This would be the last
declared dimension of a char array.
-
int ndims (Given)
-
The number of dimensions of the FORTRAN array
-
const int *dims (Given)
-
A pointer to a 1-D array giving the dimensions of the FORTRAN array.
- Notes:
- The C array is treated as an array of strings but it will actually
be a char array with one more dimension than the FORTRAN array, the
last dimension being `dest_len'. The other dimensions must be as for
the FORTRAN array.
Next: cnfImprtap - Import a FORTRAN CHARACTER array into a C array of pointers to char.
Up: CNF C Routine Descriptions
Previous: cnfImprt - Import a FORTRAN string into a C 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