next up previous 252
Next: GENPTR_CHARACTER_ARRAY - Generate a pointer to a CHARACTER array argument
Up: Full Description of F77 Macros
Previous: F77_WORD_TYPE - Define the type WORD


GENPTR_CHARACTER - Generate a pointer to a CHARACTER argument

Description:
Ensure that there exists a pointer to the character variable 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(arg)

Arguments:

arg
The dummy argument.

Examples:

GENPTR_CHARACTER(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_CHARACTER_ARRAY - Generate a pointer to a CHARACTER array argument
Up: Full Description of F77 Macros
Previous: F77_WORD_TYPE - Define the type WORD

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