DECLARE_type_ARRAY_DYN

Declare a dynamic type array

DECLARE_type_ARRAY_DYN Declare a dynamic type array

Description:

Declare a dynamic type array that will be passed to a FORTRAN routine using the type_ARRAY_ARG macro. Use this macro, in combination with the F77_CREATE_type_ARRAY and F77_FREE_type macros, where the size of the array is not known until run time. (type not LOCATOR.)

Invocation

DECLARE_type_ARRAY_DYN(arg)

Arguments

arg
The variable being declared.

Examples:

DECLARE_type_ARRAY_DYN(farg)
will expand as follows:
All systems: F77_type_TYPE *farg
DECLARE_CHARACTER_ARRAY_DYN(fstring)
will expand as follows:
All Unix: char *fstring; int fstring_length
VAX/VMS: char *fstring; int fstring_length
struct dsc$descriptor_a fstring_arg

Notes:

On VMS, for CHARACTER, the expansion of the macro is quite complex. A pointer to a descriptor structure is declared in addition to a pointer to char (used to point to the actual string of characters) and an int variable to store the length of the array. The address of the descriptor is what is actually passed to the called FORTRAN routine.