Skip to content

Commit 2a633ff

Browse files
author
Damian Rouson
committed
feat: add multidensionsal intrinsic_array support
1 parent d8931a6 commit 2a633ff

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/intrinsic_array_m.F90

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ module intrinsic_array_m
1616
integer, allocatable :: integer_2D(:,:)
1717
logical, allocatable :: logical_2D(:,:)
1818
real, allocatable :: real_2D(:,:)
19+
20+
complex, allocatable :: complex_3D(:,:,:)
21+
integer, allocatable :: integer_3D(:,:,:)
22+
logical, allocatable :: logical_3D(:,:,:)
23+
real, allocatable :: real_3D(:,:,:)
1924
contains
2025
procedure :: as_character
2126
end type

src/intrinsic_array_s.F90

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,21 @@
3535
class default
3636
error stop "intrinsic_array_t construct: unsupported rank-2 type"
3737
end select
38+
39+
rank(3)
40+
select type(array)
41+
type is(complex)
42+
intrinsic_array%complex_3D = array
43+
type is(integer)
44+
intrinsic_array%integer_3D = array
45+
type is(logical)
46+
intrinsic_array%logical_3D = array
47+
type is(real)
48+
intrinsic_array%real_3D = array
49+
class default
50+
error stop "intrinsic_array_t construct: unsupported rank-3 type"
51+
end select
52+
3853
rank default
3954
error stop "intrinsic_array_t construct: unsupported rank"
4055
end select

0 commit comments

Comments
 (0)