DISPATCH
kinds_mod.f90
1
MODULE
kinds_mod
2
use
iso_fortran_env
, only
: real32, real64
3
implicit none
4
private
5
#ifdef DOUBLE
6
integer
,
public
,
parameter
:: kindscalarvar = real64
7
#else
8
integer
,
public
,
parameter
:: kindscalarvar = real32
9
#endif DOUBLE
10
#ifdef RT_DOUBLE
11
integer
,
public
,
parameter
:: kindrtvar = real64
12
#else
13
integer
,
public
,
parameter
:: kindrtvar = real32
14
#endif RT_DOUBLE
15
type
,
public
::
kinds_t
16
contains
17
procedure
,
nopass
:: is_set
18
end type
19
type
(
kinds_t
),
public
:: kinds
20
CONTAINS
21
22
!===============================================================================
23
!> Utility function to handle optional logical switches in parameter lists
24
!===============================================================================
25
LOGICAL
FUNCTION
is_set (switch)
26
logical
,
optional
:: switch
27
if
(
present
(switch))
then
28
is_set = switch
29
else
30
is_set = .false.
31
end if
32
END FUNCTION
33
34
END MODULE
kinds_mod
kinds_mod::kinds_t
Definition:
kinds_mod.f90:15
states
kinds_mod.f90
Generated by
1.8.13