print_with_stars Subroutine

public subroutine print_with_stars(str1, str2)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: str1
character(len=*), intent(in) :: str2

Contents

Source Code


Source Code

  subroutine print_with_stars(str1, str2)
    character(*), intent (in) :: str1, str2
    character, dimension(:), allocatable :: stars
    integer :: i

    allocate(stars(len(str1) + len(str2) + len(proc_message()) ))
    do i = 1,len(str1)+len(str2)+len(proc_message())
       stars(i) = '*'
    end do

    write (*,*) stars
    write (*,*) str1, str2, proc_message()
    write (*,*) stars
  end subroutine print_with_stars