Previous: Miscellaneous Routines Up: New Routines Next: System Internal Routines
These routines allow C-language subroutines to use character strings passed in from a Fortran routine (CHARACTER*n data type). All Fortran-callable subroutines written in C must use these routines to handle character strings. The passing of strings between Fortran and C varies widely among different machine architectures. Attempting to do your own without using these routines practically guarantees that your code will not be portable.
These routines are most useful in the Fortran interface to SUBLIB routines, but they could be useful within a single application program if it uses both languages.
All of these routines are callable from C only. Do not attempt to call them from Fortran. Writing a Fortran routine that accepts C strings is much more difficult; see Section , Mixing Fortran and C, for details.
These routines have much in common in their calling sequences, so the common features and rules are described only once in the Common Features section below.
Two of the routines apply only to strings being sent out of a C routine, back to the Fortran caller. They are marked ``output'' below. The other four apply only to strings being passed in to a C routine, from a Fortran caller. They are marked ``input''.