When passing dynamically allocated character strings to Fortran or C routines the
character string length is passed as a hidden argument after the visible ones (see TRAIL
). With some
compilers this length is a 64bit long (INTEGER*8), whereas for others it is more typically a 32bit int
(INTEGER*4). Using this function avoids the need to know which size is used for the configured
CALL DOIT( %VAL( CNF_PVAL( FPTR ) ),..., %VAL( CNF_CVAL( FINT ) ) )
FINT = INTEGER (Given)
The FORTRAN integer value giving the expected length of
The string length in the correct type for the
configured compiler. Fortran equivalent of the type used by the TRAIL macro.
The data type of this function will depend on the platform in use and is declared in the include file
When mixing calls that pass locally declared character strings and dynamically allocated ones, all the
declared strings must preceed all the dynamic ones in the argument list so that the order of the TRAIL
arguments is known.