Previous: Common Features Up: Fortran String Conversion Routines Next: sc2for_array
sc2for(c_string, max_length, for_string, argptr, nargs, argno, strno);
This routine converts a standard C null-terminated string to an output Fortran string. It is used to send strings back to a Fortran caller.
String to convert in standard null-terminated C format.
Alternate maximum length of the Fortran string. Normally the maximum length is obtained from the output Fortran string itself (the ``n'' in the CHARACTER*n declaration. If MAX_LENGTH is passed in as 0, then this natural length is used. MAX_LENGTH is an alternate maximum string length in case one is provided as a parameter to the routine. The actual maximum Fortran length used is the minimum of the passed in MAX_LENGTH (if not 0) and the natural Fortran string length. The output string will be truncated if the Fortran string is not long enough. Any extra space at the end of the Fortran string will be padded with blanks in the standard Fortran style.
See the ``Common Features'' section above.