SPEED
CHECK_FILE.f90
Go to the documentation of this file.
1
! Copyright (C) 2012 The SPEED FOUNDATION
2
! Author: Ilario Mazzieri
3
!
4
! This file is part of SPEED.
5
!
6
! SPEED is free software; you can redistribute it and/or modify it
7
! under the terms of the GNU Affero General Public License as
8
! published by the Free Software Foundation, either version 3 of the
9
! License, or (at your option) any later version.
10
!
11
! SPEED is distributed in the hope that it will be useful, but
12
! WITHOUT ANY WARRANTY; without even the implied warranty of
13
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
! Affero General Public License for more details.
15
!
16
! You should have received a copy of the GNU Affero General Public License
17
! along with SPEED. If not, see <http://www.gnu.org/licenses/>.
18
25
26
subroutine
check_file
(filename,err_out)
27
28
character*70
:: filename
29
30
logical*4
:: f_ex
31
32
integer*4
:: err_out
33
integer*4
:: i,file_a,file_b
34
35
do
i=1,70
36
if
(filename(i:i).ne.
' '
)
exit
37
enddo
38
39
file_a=i
40
do
i=70,1,-1
41
if
(filename(i:i).ne.
' '
)
exit
42
enddo
43
file_b=i
44
45
f_ex=.false.
46
err_out=0
47
inquire
(file=filename,exist=f_ex)
48
if
(f_ex)
then
49
continue
50
else
51
err_out = 101
52
53
endif
54
55
return
56
57
end subroutine
check_file
58
check_file
subroutine check_file(filename, err_out)
Checks if a file is present or not.
Definition
CHECK_FILE.f90:27
speed
CHECK_FILE.f90
Generated by
1.9.8