HTML version of Scripted Foils prepared 27 December 1996

Foil 9 Derived Type in Fortran90

From CPS615-Introduction to F90 Features, Rationale for HPF and Problem Architecture Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 September 96. by Geoffrey C. Fox *
Secs 164.1
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)

Table Font Size


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Fri Aug 15 1997