! 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 B.2. ! Write numbers and strings
  program L02
    implicit none
    real, parameter :: Code = 1.2, X = 3.4, Reals = 5.6, Flag = 7.8
    character (len = *), parameter :: First = "Einstein   ", Second = "abcdefgh"
! start program Carrot
    write (unit = *, fmt = "(t4, f5.1, f4.1, tr1, a3, 2 f4.1)" ) 179.3, X, Second, Code, Reals
    write (unit = *, fmt = "(t4, 4 f4.1, tr1, a)" ) Flag, X, Reals, 2.0, First
    write (unit = *, fmt = "(t4, a24)" ) trim( First ) // "; " // Second // "........"
    stop
  end program L02
