CNF_CVAL

Convert a Fortran INTEGER into the same type as used in the TRAIL macro.

Description:

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 compiler.

Invocation

CALL DOIT( %VAL( CNF_PVAL( FPTR ) ),..., %VAL( CNF_CVAL( FINT ) ) )

Arguments

FINT = INTEGER (Given)
The FORTRAN integer value giving the expected length of the strings.

Returned Value

CNF_CVAL
The string length in the correct type for the configured compiler. Fortran equivalent of the type used by the TRAIL macro.

Notes: