33
33
! POSSIBILITY OF SUCH DAMAGE.
34
34
35
35
program main
36
- ! ! input: acceptable compiler version the form major.minor.patch
36
+ ! ! input: acceptable compiler version in the form major.minor.patch
37
37
! ! output:
38
38
! ! .true. if compiler version >= acceptable version
39
39
! ! .false. otherwise
@@ -47,41 +47,40 @@ program main
47
47
call get_command_argument(first_argument,acceptable_version,status= stat)
48
48
call validate_command_line( stat )
49
49
50
- print * , patch_meets_minimum ( acceptable_version )
50
+ print * , meets_minimum ( acceptable_version )
51
51
52
52
contains
53
53
54
- pure function patch_meets_minimum ( required_version ) result( is_acceptable )
54
+ pure function meets_minimum ( required_version ) result( acceptable )
55
55
character (len=* ), intent (in ) :: required_version
56
- logical is_acceptable
56
+ logical acceptable
57
57
58
- is_acceptable = .false. ! default result
58
+ acceptable = .false. ! default result
59
59
60
60
associate( actual_version = > compiler_version() )
61
61
associate(major_version= >major(actual_version), acceptable_major= >major(required_version))
62
62
if (major_version < acceptable_major) return
63
63
if (major_version > acceptable_major) then
64
- is_acceptable = .true.
64
+ acceptable = .true.
65
65
return
66
66
end if
67
67
associate(minor_version= >minor(actual_version), acceptable_minor= >minor(required_version))
68
68
if (minor_version < acceptable_minor) return
69
69
if (minor_version > acceptable_minor) then
70
- is_acceptable = .true.
70
+ acceptable = .true.
71
71
return
72
72
end if
73
73
associate(patch_version= >patch(actual_version), acceptable_patch= >patch(required_version))
74
74
if (patch_version < acceptable_patch) return
75
- is_acceptable = .true.
75
+ acceptable = .true.
76
76
end associate
77
77
end associate
78
78
end associate
79
79
end associate
80
80
81
-
82
81
end function
83
82
84
- subroutine validate_command_line ( command_line_status )
83
+ pure subroutine validate_command_line ( command_line_status )
85
84
integer , intent (in ) :: command_line_status
86
85
select case (command_line_status)
87
86
case (- 1 )
0 commit comments