1 ! Test scalar pack for character arrays.
5 integer, parameter :: n1
= 3, n2
= 4, nv
= 16, slen
= 9
6 character (len
= slen
), dimension (n1
, n2
) :: a
7 character (len
= slen
), dimension (nv
) :: vector
13 a (i1
, i2
) = 'abc'(i1
:i1
) // 'defg'(i2
:i2
) // 'cantrip'
18 vector (i
) = 'crespo' // '0123456789abcdef'(i
:i
)
22 call test1 (pack (a
, mask
))
23 call test2 (pack (a
, mask
, vector
))
26 character (len
= slen
), dimension (:) :: b
32 if (b (i
) .ne
. a (i1
, i2
)) call abort
35 if (size (b
, 1) .ne
. i
) call abort
39 character (len
= slen
), dimension (:) :: b
41 if (size (b
, 1) .ne
. nv
) call abort
46 if (b (i
) .ne
. a (i1
, i2
)) call abort
50 if (b (i
) .ne
. vector (i
)) call abort