next up previous 252
Next: cnfExprt - Export a C string to a FORTRAN string
Up: CNF C Routine Descriptions
Previous: cnfExpla - Export a C int array to a FORTRAN LOGICAL array


cnfExpn - Export a C string to a FORTRAN string, copying a given maximum number of characters

Description:
Export a C string to a FORTRAN string, copying a maximum of `max' characters. If the C string is shorter than the space allocated to the FORTRAN string, then pad it with blanks, even if the whole source string was not copied as it had more than `max' characters. If the C string is longer than the space allocated to the FORTRAN string, then truncate the string.

Invocation:
cnfExpn( source_c, max, dest_f, dest_len )

Arguments:

const char *source_c (Given)
A pointer to the input C string
int max (Given)
The maximum number of character to be copied from source_c to dest_f
char *dest_f (Returned via pointer)
A pointer to the FORTRAN output string
int dest_len (Given)
The length of the FORTRAN output string



next up previous 252
Next: cnfExprt - Export a C string to a FORTRAN string
Up: CNF C Routine Descriptions
Previous: cnfExpla - Export a C int array to a FORTRAN LOGICAL array

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