Module global

public

type :: person
  private
  character(len=15) :: first, last
  integer age
end type person

contains

Subroutine initialize (name,f,l,a)

  character(len=15) :: f,l
  integer :: a

  type(person) :: name

  name = person(f,l,a)
  print*,name

end subroutine initialize

end module global


program test

use global
implicit none

  type(person) :: Nicole
  
  !Nicole = person("Nicole         ","Smith          ",27)
  !call initialize(Nicole,"Nicole         ","Smith          ",27)
  call initialize(Nicole,"Nicole","Smith",27)

end program test
