! 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.

! (From Jouk JANSEN, Univ of Amsterdam)
  module I10M
    implicit none
    public :: Options
    contains
    subroutine Options( Str1 , Str2 )
      character ( len = * ), intent(in), optional :: Str1 , Str2
      integer :: L1, L2
  ! start subroutine Options
      write (unit = *, fmt = *) " ============================== "
      if (present( Str1 ) ) then
        L1 = len( Str1 )
        write (unit = *, fmt = *) " 1: ", Str1
      else
        L1 = -1
      end if
      if ( present(Str2) ) then
        L2 = len( Str2 )
        write (unit = *, fmt = *) " 2: ", Str2
      else
        L2 = -1
      end if
      write (unit = *, fmt = *) " Lengths: ", L1, L2
      return
    end subroutine Options
  end module I10M
