f2k  Reference documentation for version 0.0
f2k_header.f90
Go to the documentation of this file.
1 !----------------------------------------------------------------------------------------
2 !
3 ! This file is part of f2k.
4 !
5 ! Copyright (C) 2016-2017 by the f2k authors
6 !
7 ! The f2k code is free software;
8 ! You can use it, redistribute it, and/or modify it under the terms
9 ! of the GNU General Public License as published by the Free Software Foundation;
10 ! either version 3 of the License, or (at your option) any later version.
11 ! The full text of the license can be found in the file LICENSE at
12 ! the top level of the f2k distribution.
13 !
14 !----------------------------------------------------------------------------------------
15 
18 
19 !----------------------------------------------------------------------------------------
21 
23 
24 module f2k_header
25 
26  use iso_fortran_env, only: output_unit
27 
28  implicit none
29 
30  private
31 
32  !----------------------------------------------------------------------------------------
33  ! definitions:
34 
35  character ( len = * ), public, parameter :: f2k_version = 'V0.0 Jan17'
36 
37  !----------------------------------------------------------------------------------------
38  ! public definitions:
39  public :: header
40 
41  !----------------------------------------------------------------------------------------
42 
43 contains
44 
45  ! ---------------------------------------------------------------------------------------------
53  subroutine header( message, unit )
54 
55  implicit none
56 
57  character ( len = * ), intent(in), optional :: message
58  integer ( kind = 4 ), intent(in), optional :: unit
59 
60  integer ( kind = 4 ) :: temp_unit
61 
62  ! sort the output unit out:
63  if ( present(unit) ) then
64  temp_unit = unit
65  else
66  temp_unit = output_unit
67  end if
68  ! write the header:
69  write(temp_unit,'(a)') "***************************************************************"
70  write(temp_unit,'(a)') " __ ___ _ "
71  write(temp_unit,'(a)') " / _|_ ) |__ "
72  write(temp_unit,'(a)') " | _|/ /| / / "
73  write(temp_unit,'(a)') " |_| /___|_\_\ "//" "//f2k_version
74  write(temp_unit,'(a)') " "
75  write(temp_unit,'(a)') "***************************************************************"
76  ! write the message if it is present:
77  if ( present(message) ) then
78  write(temp_unit,'(a)') " "//message
79  end if
80  ! end the header:
81  write(temp_unit,'(a)') " This application was developed using the f2k library."
82  write(temp_unit,'(a)') "***************************************************************"
83 
84  end subroutine header
85 
86  ! ---------------------------------------------------------------------------------------------
87 
88 end module f2k_header
character(len=*), parameter, public f2k_version
Definition: f2k_header.f90:35
subroutine, public header(message, unit)
Subroutine that prints the f2k header.
Definition: f2k_header.f90:54
This module contains the subroutine that prints the f2k header to screen or other units...
Definition: f2k_header.f90:24