next up previous 252
Next: GENPTR_SUBROUTINE - Generate a pointer to a SUBROUTINE argument.
Up: Full Description of F77 Macros
Previous: GENPTR_CHARACTER - Generate a pointer to a CHARACTER argument


GENPTR_CHARACTER_ARRAY - Generate a pointer to a CHARACTER array argument

Description:
Ensure that there exists a pointer to the character array that has been passed as an actual argument to the C routine. Also generate a variable that contains the length of the actual character argument and call it `arg_length'.

Invocation:
GENPTR_CHARACTER_ARRAY(arg)

Arguments:

arg
The dummy argument.

Examples:

GENPTR_CHARACTER_ARRAY(x)
will expand as follows:

All Unix:
VAX/VMS: char *x = x_arg->dsc$a_pointer;
  int x_length = x_arg->dsc$w_length;


Notes:
On Unix systems, this macro is null, but on a VAX/VMS system, this macro actually declares the variables that are the pointer to the character string and the integer that contains its length.



next up previous 252
Next: GENPTR_SUBROUTINE - Generate a pointer to a SUBROUTINE argument.
Up: Full Description of F77 Macros
Previous: GENPTR_CHARACTER - Generate a pointer to a CHARACTER argument

CNF and F77 Mixed Language Programming -- FORTRAN and C
Starlink User Note 209
P.M. Allan
A.J. Chipperfield
R.F. Warren-Smith
19 January 2000
E-mail:ussc@star.rl.ac.uk