Basic HTML version of Foils prepared 17 Sept 1996

Foil 11 Derived Type in Fortran90

From New CPS615HPF and Fortran90 Discussion Sept 17 96 Basic Simulation Track for Computational Science CPS615 -- Fall Semester 96. by Geoffrey C. Fox, Tom Haupt


TYPE PERSON
  • CHARACTER(LEN=10) NAME
  • REAL AGE
  • INTEGER ID
END TYPE PERSON
TYPE(PERSON) YOU,ME
The Identification number of YOU would be accessed as YOU%ID as an ordinary integer
One can define global operators so that YOU+ME could be defined
One can use name of derived type as a constructor
YOU = PERSON ('Pamela Fox', 12, 3)



© on Tue Oct 7 1997