Next: Pointer Declaration
Up: Pointers and Targets
Previous: Pointers and Targets
  Contents
Unlike C pointers, F90 pointers are much less flexible and more highly
optimized. The space to which a F90 pointer ``points'' is called
a target.
Several restrictions
- F90 pointers are strongly typed: e.g. a pointer to a REAL, scalar target
may not point to any other data type; similarly, a pointer
to a REAL 1D array cannot point to a REAL 2D array;
- any variable that is pointed at must have the TARGET attribute;
- pointers are automatically dereferenced (the pointer name and the target
name reffer to the same memory location);
- it is not possible to print out the address of the target of a pointer.
Benefits: provide a more flexible alternative to allocatable arrays,
and allow the creation and manipulation of linked lists, etc.
Adrian Sandu
2001-08-26