! 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 2.1. Assignment statements with constant expressions.
  program C01
    implicit none
    integer, parameter :: NAME_LENGTH = 21
    real :: Avogadros_Number
    integer :: Many
    complex :: Z
    logical :: Flag
    character (len = NAME_LENGTH) :: Name
! start program C01
    Many = 346021  ! Integer type
    Avogadros_Number = 6.0221367e23  ! Real type
    Z = (0.0, 1.75e8)  ! Complex type
    Flag = .true.
    Name = " James Clerk Maxwell "  ! Character type, length 21
    write (unit = *, fmt = *) Many, Avogadros_Number, Z, Flag, Name
    stop
  end program C01
