1 ! Test unpack1 for character arrays.
5 integer, parameter :: n1
= 3, n2
= 4, nv
= 10, slen
= 9
6 character (len
= slen
) :: field
7 character (len
= slen
), dimension (nv
) :: vector
8 logical, dimension (n1
, n2
) :: mask
12 mask (1, :) = (/ .true
., .false
., .true
., .true
. /)
13 mask (2, :) = (/ .true
., .false
., .false
., .false
. /)
14 mask (3, :) = (/ .false
., .true
., .true
., .true
. /)
17 vector (i
) = 'crespo' // '0123456789'(i
:i
)
20 call test (unpack (vector
, mask
, field
))
23 character (len
= slen
), dimension (:, :) :: a
25 if (size (a
, 1) .ne
. n1
) call abort
26 if (size (a
, 2) .ne
. n2
) call abort
31 if (mask (i1
, i2
)) then
33 if (a (i1
, i2
) .ne
. vector (i
)) call abort
35 if (a (i1
, i2
) .ne
. field
) call abort