02.07.2013 Views

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Result type,<br />

type parameters,<br />

and shape<br />

Intrinsic procedures<br />

Intrinsic procedure specifications<br />

The result is of type default integer. It is scalar if DIM is absent or MASK has rank one;<br />

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)<br />

where (d 1, d 2,...,d n)istheshapeofMASK.<br />

Result value<br />

Case 1 The result of COUNT(MASK) has a value equal to the number of .TRUE.<br />

elements of MASK or has the value zero if MASK has size zero.<br />

Case 2 If MASK has rank one, COUNT(MASK, DIM) has a value equal to that of<br />

COUNT(MASK). Otherwise,thevalueofelement(s 1, s 2,...,s DIM-1, s DIM+1, ...,<br />

s n )ofCOUNT(MASK, DIM) is equal to COUNT(MASK(s 1 , s 2 , ..., s DIM-1 ,:,<br />

s DIM+1, ..., s n)).<br />

Specific forms<br />

KCOUNT.<br />

CSHIFT(ARRAY, SHIFT, DIM)<br />

Optional argument<br />

DIM<br />

Description<br />

Perform a circular shift on an array expression of rank one, or perform circular shifts on all<br />

the complete rank one sections along a given dimension of an array expression of rank two or<br />

greater.<br />

Elements shifted out at one end of a section are shifted in at the other end. Different sections<br />

may be shifted by different amounts and in different directions (positive for left shifts,<br />

negative for right shifts).<br />

Class<br />

Transformational function.<br />

Chapter 11 503

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!