! 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.10. Replacement of a substring.
  program G10
    implicit none
    integer, parameter :: SL = 12
    character (len = SL) :: El_59
! start program G10
    El_59 = "Praseodymium"
    El_59(5: 9) = "XXXXX"
    write (unit = *, fmt = *) El_59  ! Prints: PrasXXXXXium
    stop
  end program G10
