FMUTIL
0.1
Fortran Miscellaneous UTILities
testmod.f90
Go to the documentation of this file.
1
!##############################################################################
2
! ________ _____ ______________
3
! / ____/ |/ / / / /_ __/ _/ /
4
! / /_ / /|_/ / / / / / / / // /
5
! / __/ / / / / /_/ / / / _/ // /___
6
! /_/ /_/ /_/\____/ /_/ /___/_____/
7
!
8
! Copyright 2020 Bharat Mahajan
9
!
10
! Licensed under the Apache License, Version 2.0 (the "License");
11
! you may not use this file except in compliance with the License.
12
! You may obtain a copy of the License at
13
!
14
! http://www.apache.org/licenses/LICENSE-2.0
15
!
16
! Unless required by applicable law or agreed to in writing, software
17
! distributed under the License is distributed on an "AS IS" BASIS,
18
! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
! See the License for the specific language governing permissions and
20
! limitations under the License.
21
!
26
!
27
!##############################################################################
28
29
30
module
testmodule
31
use
fmutil
32
33
type
,
extends
(vecelem) ::
relem
34
real
:: rdata
35
contains
36
procedure
:: assignvecelem =>
assign_relem
37
end type
relem
38
39
type
,
extends
(vecelem) ::
ielem
40
integer
,
dimension(10)
:: idata
41
contains
42
procedure
:: assignvecelem =>
assign_ielem
43
end type
ielem
44
45
contains
46
47
48
49
subroutine
assign_relem
(lhs, rhs)
50
implicit none
51
class
(
relem
),
intent(out)
:: lhs
52
class
(vecelem),
intent(in)
:: rhs
53
54
select type
(rhs)
55
class is
(
relem
)
56
lhs%rdata = rhs%rdata
57
end select
58
end subroutine
assign_relem
59
60
subroutine
assign_ielem
(lhs, rhs)
61
implicit none
62
class
(
ielem
),
intent(out)
:: lhs
63
class
(vecelem),
intent(in)
:: rhs
64
65
select type
(rhs)
66
class is
(
ielem
)
67
lhs%idata = rhs%idata
68
end select
69
end subroutine
assign_ielem
70
71
72
end module
testmodule
73
74
testmodule::relem
Definition:
testmod.f90:33
testmodule::assign_ielem
subroutine assign_ielem(lhs, rhs)
Definition:
testmod.f90:61
testmodule::assign_relem
subroutine assign_relem(lhs, rhs)
Definition:
testmod.f90:50
testmodule::ielem
Definition:
testmod.f90:39
fmutil
Definition:
fmutil.F90:151
testmodule
TestMod Module.
Definition:
testmod.f90:30
src
tests
testmod.f90
Generated on Sun Jun 28 2020 14:09:22 for FMUTIL by
1.8.18