! 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 9.5. Nonadvancing data transfer.
  program J05
    implicit none
    character (len = *), parameter :: S ="supercalifragilisticexpialidocious"
! start program J05
    open (unit = 2, file = "J05.zzz", status = "new", action = "write")
    write (unit = 2, fmt = *) " Line 1. "
    write (unit = 2, fmt = "(a)", advance = "NO") " ### "
    write (unit = 2, fmt = "(a)", advance = "NO") S( 1: 17)
    write (unit = 2, fmt = "(a)", advance = "NO") " ### "
    write (unit = 2, fmt = "(a)", advance = "NO") S( 18: 27)
    write (unit = 2, fmt = "(a)", advance = "NO") " ### "
    write (unit = 2, fmt = "(a)", advance = "NO") S(28: )
    write (unit = 2, fmt = *)
    write (unit = 2, fmt = *) " Line 3. "
    stop
  end program J05
