-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli_header.f90
More file actions
executable file
·64 lines (47 loc) · 1.42 KB
/
cli_header.f90
File metadata and controls
executable file
·64 lines (47 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
!==================================================================
! Command Line Interface (Header file)
!
! Created by: Hisashi Takeda, Ph.D. 2019-01-19
!==================================================================
implicit none
private
public :: cmd_ty, cmd, i
integer :: idummy
real(8) :: rdummy
logical :: ldummy
character(255) :: cwd, arg
character(19) :: date_time
integer :: status, i_arg = 1
type cmd_ty
character(255) :: title = 'Program title'
character(255) :: exe = 'Executable_file_name'
character(255) :: version = '1.0'
character(255) :: author = 'Hisashi Takeda, Ph.D.'
character(255) :: copyright = 'Copyright(C) All Rights Reserved.'
character(255) :: usage(200) = 'No usage is given'
integer :: n_usage = 1
contains
procedure get_args
procedure print_help
procedure print_version
end type
type(cmd_ty) :: cmd
integer :: i = 1
interface get_value
module subroutine get_character (str, i_arg)
character(*), intent(inout) :: str
integer , intent(inout) :: i_arg
end subroutine
module subroutine get_integer (ival, i_arg)
integer, intent(inout) :: ival
integer, intent(inout) :: i_arg
end subroutine
module subroutine get_real (rval, i_arg)
real(8), intent(inout) :: rval
integer, intent(inout) :: i_arg
end subroutine
module subroutine get_logical (ox, i_arg)
logical, intent(inout) :: ox
integer, intent(inout) :: i_arg
end subroutine
end interface