|
6 | 6 | module procedure construct |
7 | 7 |
|
8 | 8 | #ifndef NAGFOR |
9 | | - select rank(array) |
| 9 | + select rank(array) |
10 | 10 | rank(1) |
11 | 11 | #endif |
12 | 12 | select type(array) |
|
18 | 18 | intrinsic_array%logical_1D = array |
19 | 19 | type is(real) |
20 | 20 | intrinsic_array%real_1D = array |
| 21 | + type is(double precision) |
| 22 | + intrinsic_array%double_precision_1D = array |
21 | 23 | class default |
22 | 24 | error stop "intrinsic_array_t construct: unsupported rank-2 type" |
23 | 25 | end select |
|
32 | 34 | intrinsic_array%logical_2D = array |
33 | 35 | type is(real) |
34 | 36 | intrinsic_array%real_2D = array |
| 37 | + type is(double precision) |
| 38 | + intrinsic_array%double_precision_2D = array |
35 | 39 | class default |
36 | 40 | error stop "intrinsic_array_t construct: unsupported rank-2 type" |
37 | 41 | end select |
|
46 | 50 | intrinsic_array%logical_3D = array |
47 | 51 | type is(real) |
48 | 52 | intrinsic_array%real_3D = array |
| 53 | + type is(double precision) |
| 54 | + intrinsic_array%double_precision_3D = array |
49 | 55 | class default |
50 | 56 | error stop "intrinsic_array_t construct: unsupported rank-3 type" |
51 | 57 | end select |
|
61 | 67 | integer, parameter :: single_number_width=32 |
62 | 68 |
|
63 | 69 | if (1 /= count( & |
64 | | - [ allocated(self%complex_1D), allocated(self%integer_1D), allocated(self%logical_1D), allocated(self%real_1D) & |
65 | | - ,allocated(self%complex_2D), allocated(self%integer_2D), allocated(self%logical_2D), allocated(self%real_2D) & |
| 70 | + [ allocated(self%complex_1D), allocated(self%complex_double_1D), allocated(self%integer_1D), & |
| 71 | + allocated(self%logical_1D), allocated(self%real_1D), & |
| 72 | + allocated(self%complex_2D), allocated(self%complex_double_2D), allocated(self%integer_2D), & |
| 73 | + allocated(self%logical_2D), allocated(self%real_2D), & |
| 74 | + allocated(self%complex_3D), allocated(self%complex_double_3D), allocated(self%integer_3D), & |
| 75 | + allocated(self%logical_3D), allocated(self%real_3D) & |
66 | 76 | ])) error stop "intrinsic_array_t as_character: ambiguous component allocation status." |
67 | 77 |
|
68 | 78 | if (allocated(self%complex_1D)) then |
69 | 79 | character_self = repeat(" ", ncopies = single_number_width*size(self%complex_1D)) |
70 | 80 | write(character_self, *) self%complex_1D |
| 81 | + else if (allocated(self%complex_double_1D)) then |
| 82 | + character_self = repeat(" ", ncopies = single_number_width*size(self%complex_double_1D)) |
| 83 | + write(character_self, *) self%complex_double_1D |
71 | 84 | else if (allocated(self%integer_1D)) then |
72 | 85 | character_self = repeat(" ", ncopies = single_number_width*size(self%integer_1D)) |
73 | 86 | write(character_self, *) self%integer_1D |
|
77 | 90 | else if (allocated(self%real_1D)) then |
78 | 91 | character_self = repeat(" ", ncopies = single_number_width*size(self%real_1D)) |
79 | 92 | write(character_self, *) self%real_1D |
| 93 | + else if (allocated(self%double_precision_1D)) then |
| 94 | + character_self = repeat(" ", ncopies = single_number_width*size(self%double_precision_1D)) |
| 95 | + write(character_self, *) self%double_precision_1D |
80 | 96 | else if (allocated(self%complex_2D)) then |
81 | 97 | character_self = repeat(" ", ncopies = single_number_width*size(self%complex_2D)) |
82 | 98 | write(character_self, *) self%complex_2D |
| 99 | + else if (allocated(self%complex_double_2D)) then |
| 100 | + character_self = repeat(" ", ncopies = single_number_width*size(self%complex_double_2D)) |
| 101 | + write(character_self, *) self%complex_double_2D |
83 | 102 | else if (allocated(self%integer_2D)) then |
84 | 103 | character_self = repeat(" ", ncopies = single_number_width*size(self%integer_2D)) |
85 | 104 | write(character_self, *) self%integer_2D |
|
89 | 108 | else if (allocated(self%real_2D)) then |
90 | 109 | character_self = repeat(" ", ncopies = single_number_width*size(self%real_2D)) |
91 | 110 | write(character_self, *) self%real_2D |
| 111 | + else if (allocated(self%double_precision_2D)) then |
| 112 | + character_self = repeat(" ", ncopies = single_number_width*size(self%double_precision_2D)) |
| 113 | + write(character_self, *) self%double_precision_2D |
| 114 | + else if (allocated(self%complex_3D)) then |
| 115 | + character_self = repeat(" ", ncopies = single_number_width*size(self%complex_3D)) |
| 116 | + write(character_self, *) self%complex_3D |
| 117 | + else if (allocated(self%complex_double_3D)) then |
| 118 | + character_self = repeat(" ", ncopies = single_number_width*size(self%complex_double_3D)) |
| 119 | + write(character_self, *) self%complex_double_3D |
| 120 | + else if (allocated(self%integer_3D)) then |
| 121 | + character_self = repeat(" ", ncopies = single_number_width*size(self%integer_3D)) |
| 122 | + write(character_self, *) self%integer_3D |
| 123 | + else if (allocated(self%logical_3D)) then |
| 124 | + character_self = repeat(" ", ncopies = single_number_width*size(self%logical_1D)) |
| 125 | + write(character_self, *) self%logical_3D |
| 126 | + else if (allocated(self%real_3D)) then |
| 127 | + character_self = repeat(" ", ncopies = single_number_width*size(self%real_3D)) |
| 128 | + write(character_self, *) self%real_3D |
| 129 | + else if (allocated(self%double_precision_3D)) then |
| 130 | + character_self = repeat(" ", ncopies = single_number_width*size(self%double_precision_3D)) |
| 131 | + write(character_self, *) self%double_precision_3D |
92 | 132 | end if |
93 | 133 |
|
94 | 134 | character_self = trim(adjustl(character_self)) |
|
0 commit comments