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


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

in Table To:


© on Tue Oct 7 1997