summaryrefslogtreecommitdiff
path: root/gcc/fortran/intrinsic.texi
diff options
context:
space:
mode:
authordfranke <dfranke@138bc75d-0d04-0410-961f-82ee72b054a4>2009-12-06 12:59:46 +0000
committerdfranke <dfranke@138bc75d-0d04-0410-961f-82ee72b054a4>2009-12-06 12:59:46 +0000
commitb646cda9eca2dce1ed06c5f5693ca6b9f9864bb5 (patch)
tree4965280cb820053a2b37aecf1f199b99933f3ef9 /gcc/fortran/intrinsic.texi
parent0fb7406c2713947237e7b633671b5d8efd6cf0b2 (diff)
downloadgcc-b646cda9eca2dce1ed06c5f5693ca6b9f9864bb5.tar.gz
2009-12-06 Daniel Franke <franke.daniel@gmail.com>
PR fortran/40904 * intrinsics.texi: Fixed description of COUNT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155022 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/intrinsic.texi')
-rw-r--r--gcc/fortran/intrinsic.texi16
1 files changed, 9 insertions, 7 deletions
diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi
index 615f0364e1c..753e6e14ab7 100644
--- a/gcc/fortran/intrinsic.texi
+++ b/gcc/fortran/intrinsic.texi
@@ -2738,11 +2738,11 @@ Inverse function: @ref{ACOSH}
@table @asis
@item @emph{Description}:
-@code{COUNT(MASK [, DIM [, KIND]])} counts the number of @code{.TRUE.}
-elements of @var{MASK} along the dimension of @var{DIM}. If @var{DIM} is
-omitted it is taken to be @code{1}. @var{DIM} is a scalar of type
-@code{INTEGER} in the range of @math{1 \leq DIM \leq n)} where @math{n}
-is the rank of @var{MASK}.
+Counts the number of @code{.TRUE.} elements in a logical @var{MASK},
+or, if the @var{DIM} argument is supplied, counts the number of
+elements along each row of the array in the @var{DIM} direction.
+If the array has zero size, or all of the elements of @var{MASK} are
+@code{.FALSE.}, then the result is @code{0}.
@item @emph{Standard}:
Fortran 95 and later, with @var{KIND} argument Fortran 2003 and later
@@ -2751,7 +2751,7 @@ Fortran 95 and later, with @var{KIND} argument Fortran 2003 and later
Transformational function
@item @emph{Syntax}:
-@code{RESULT = COUNT(MASK [, DIM [, KIND]])}
+@code{RESULT = COUNT(MASK [, DIM, KIND])}
@item @emph{Arguments}:
@multitable @columnfractions .15 .70
@@ -2764,7 +2764,9 @@ expression indicating the kind parameter of the result.
@item @emph{Return value}:
The return value is of type @code{INTEGER} and of kind @var{KIND}. If
@var{KIND} is absent, the return value is of default integer kind.
-The result has a rank equal to that of @var{MASK}.
+If @var{DIM} is present, the result is an array with a rank one less
+than the rank of @var{ARRAY}, and a size corresponding to the shape
+of @var{ARRAY} with the @var{DIM} dimension removed.
@item @emph{Example}:
@smallexample