diff options
Diffstat (limited to 'cppawk-iter.1')
-rw-r--r-- | cppawk-iter.1 | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/cppawk-iter.1 b/cppawk-iter.1 index d55fb24..490c9cb 100644 --- a/cppawk-iter.1 +++ b/cppawk-iter.1 @@ -84,6 +84,7 @@ iter \- powerful, user-extensible iteration language for Awk \fI// calculating clauses\fP summing (\fIvar\fP, \fIexpr\fP) + counting (\fIvar\fP, \fIexpr\fP) maximizing (\fIvar\fP, \fIexpr\fP) minimizing (\fIvar\fP, \fIexpr\fP) argmax (\fImaxvar\fP, \fIarg\fP, \fIexpr\fP) @@ -787,6 +788,32 @@ ends up with the sum of the samples of the value of .I expr from before each iteration of the loop. +.SS Loop clause \fIcounting\fP +.bk +.B Syntax: + +.ft B + counting (\fIvar\fP, \fIexpr\fP) +.ft R + +.B Description + +The +.B counting +clause initialized +.I var +to zero. Prior to each iteration of the loop, +.I expr +is evaluated and if it yields a true value, then +.I var +is incremented. + +Thus, +.I var +ends up with a count of the number of iterations in which +.I expr +was true. + .SS Loop clauses \fIminimizing\fP and \fImaximizing\fP .bk .B Syntax: |