1 ! Like char_result_3.f90, but the array arguments are pointers.
3 pure elemental
function double (x
)
4 integer, intent (in
) :: x
13 pure elemental
function double (x
)
14 integer, intent (in
) :: x
19 integer, dimension (100:104), target
:: a
20 integer, dimension (:), pointer :: ap
23 a
= (/ (i
+ 5, i
= 0, 4) /)
25 lower
= lbound(a
,dim
=1)
27 call test (f1 (ap
), 35)
28 call test (f2 (ap
), 115)
29 call test (f3 (ap
), 60)
30 call test (f4 (ap
, 104, 2), 21)
33 integer, dimension (:), pointer :: array
34 character (len
= sum (array
)) :: f1
39 integer, dimension (:), pointer :: array
40 character (len
= array (101) + a (104) + 100) :: f2
45 integer, dimension (:), pointer :: array
46 character (len
= sum (double (array (101:)))) :: f3
50 function f4 (array
, upper
, stride
)
51 integer, dimension (:), pointer :: array
52 integer :: upper
, stride
53 character (len
= sum (array (lower
:upper
:stride
))) :: f4
57 subroutine test (string
, length
)
58 character (len
= *) :: string
59 integer, intent (in
) :: length
60 if (len (string
) .ne
. length
) call abort