! Program Example from "Essential Fortran 90 & 95" by Loren P. Meissner
! Copyright 1996. Copying for sale requires permission from the author.
! Otherwise, distribution is permitted if these three lines are included.

! Example 6.30. Array of structure components.
  program G30
    use Element_M
    implicit none
    type (Isotope_Type), dimension(10) :: Some_Isotopes
    real, dimension(10) :: Abundances
! start program G30
    Some_Isotopes = Isotope_Type( 0, 0.0)  ! Assign whole array of structures
    Some_Isotopes(2) % Abundance = 0.99
    Abundances = Some_Isotopes % Abundance
    write (unit = *, fmt = *) Abundances(: 3)
    stop
  end program G30
