FLASH-X
Doxygen Generated Documentation From Interface Source Code
source
flashUtilities
general
ut_getFreeFileUnit.F90
Go to the documentation of this file.
1
!! NOTICE
2
!! Copyright 2022 UChicago Argonne, LLC and contributors
3
!!
4
!! Licensed under the Apache License, Version 2.0 (the "License");
5
!! you may not use this file except in compliance with the License.
6
!!
7
!! Unless required by applicable law or agreed to in writing, software
8
!! distributed under the License is distributed on an "AS IS" BASIS,
9
!! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
!! See the License for the specific language governing permissions and
11
!! limitations under the License.
12
!!
25
integer
function
ut_getFreeFileUnit
()
26
27
use
Driver_interface
,
ONLY
:
Driver_abort
28
29
implicit none
30
31
logical
:: connected
32
integer
:: number
33
!
34
!
35
! ...Get a free unit number within range 7-999.
36
!
37
!
38
ut_getFreeFileUnit
=
0
39
40
do
number
=
7
,
9
9
9
41
inquire
(
UNIT
=
number,
OPENED
=
connected)
42
if
(
.not.
connected)
then
43
ut_getFreeFileUnit
=
number
44
exit
45
end if
46
end do
47
!
48
!
49
! ...Abort, if none found.
50
!
51
!
52
if
(
ut_getFreeFileUnit
=
=
0
)
then
53
call
Driver_abort
(
'[ut_getFreeFileUnit] ERROR: no free unit number < 1000 found'
)
54
end if
55
!
56
!
57
! ...Ready!
58
!
59
!
60
return
61
end function
ut_getFreeFileUnit
Driver_interface::Driver_abort
Definition:
Driver_interface.F90:26
Driver_interface
Definition:
Driver_interface.F90:18
ut_getFreeFileUnit
integer function ut_getFreeFileUnit()
Definition:
ut_getFreeFileUnit.F90:26
Generated on Tue Feb 1 2022 17:33:14 for FLASH-X by
1.9.3