HP Fortran Programmer's Reference (September 2007)

Intrinsic procedures
Intrinsic procedure specifications
Chapter 11538
Result type,
type parameters,
and shape
The result is of type default integer. It is scalar if DIM is absent or MASK has rank one;
otherwise, the result is an array of rank
n
-1 and of shape (
d
1
,
d
2
, ...,
d
DIM-1
,
d
DIM+1
, ...,
d
n
)
where (
d
1
,
d
2
, ...,
d
n
) is the shape of MASK.
Result value
Case 1 The result of COUNT(MASK) has a value equal to the number of .TRUE.
elements of MASK or has the value zero if MASK has size zero.
Case 2 If MASK has rank one, COUNT(MASK, DIM) has a value equal to that of
COUNT(MASK). Otherwise, the value of element (
s
1
,
s
2
, ...,
s
DIM-1
,
s
DIM+1
, ...,
s
n
)ofCOUNT(MASK, DIM) is equal to COUNT(MASK(
s
1
,
s
2
, ...,
s
DIM-1
,:,
s
DIM+1
, ...,
s
n
)).
Specific forms
KCOUNT.
CSHIFT(ARRAY, SHIFT, DIM)
Optional argument
DIM
Description
Perform a circular shift on an array expression of rank one, or perform circular shifts on all
the complete rank one sections along a given dimension of an array expression of rank two or
greater.
Elements shifted out at one end of a section are shifted in at the other end. Different sections
may be shifted by different amounts and in different directions (positive for left shifts,
negative for right shifts).
Class
Transformational function.