! 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.8. Substring notation.
  program G08
    implicit none
    integer, parameter :: S_LEN = 18
    character (len = S_LEN) ::  El_Name, Compound
! start program G08
    Compound = "Zinc Hydroxide"
    write (unit = *, fmt = *) Compound(1: 4)
    El_Name = "Praseodymium        "
    write (unit = *, fmt = *) El_Name(2: 9)
    stop
  end program G08
