Pointers to Structures

  • Cooper Redwine

Abstract

Chapter 10 gave several examples of pointers to variables of intrinsic types, and this chapter will discuss pointers to variables of derived types. A representative example of a declaration of a pointer to a structure is

TYPE (employee_type), POINTER :: ptr

This specifies that ptr is a pointer that is capable of pointing to any scalar variable of type employee_type. However, ptr can never point to a variable of another derived type, and of course, it cannot point to a variable of any intrinsic type. Furthermore, ptr can never point to any array, not even to an array of type employee_type. This is because a Fortran 90 pointer is permitted to point only to a data object of a particular rank, and ptr can point only to a data object of rank 0 (that is, to a scalar) as indicated by the absence of array extent specifications in its declaration.

Keywords

Root Node Binary Tree Storage Area Left Child Print Statement 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag New York, Inc. 1995

Authors and Affiliations

  • Cooper Redwine
    • 1
  1. 1.Northrop Grumman CorporationPico RiveraUSA

Personalised recommendations