| 1 |
/* ./util_f77/icnteq.f -- translated by f2c (version 20030320). |
| 2 |
You must link the resulting object file with the libraries: |
| 3 |
-lf2c -lm (in that order) |
| 4 |
*/ |
| 5 |
|
| 6 |
#include <punc/vf2c.h> |
| 7 |
|
| 8 |
|
| 9 |
/* ----------------------------------------------------------------------- */ |
| 10 |
|
| 11 |
/* Count the number of elements equal to a specified integer value. */ |
| 12 |
|
| 13 |
integer icnteq_(integer *n, integer *array, integer *value) |
| 14 |
{ |
| 15 |
/* System generated locals */ |
| 16 |
integer ret_val, i__1; |
| 17 |
|
| 18 |
/* Local variables */ |
| 19 |
static integer i__, k; |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
/* Parameter adjustments */ |
| 24 |
--array; |
| 25 |
|
| 26 |
/* Function Body */ |
| 27 |
k = 0; |
| 28 |
i__1 = *n; |
| 29 |
for (i__ = 1; i__ <= i__1; ++i__) { |
| 30 |
if (array[i__] == *value) { |
| 31 |
++k; |
| 32 |
} |
| 33 |
/* L10: */ |
| 34 |
} |
| 35 |
ret_val = k; |
| 36 |
|
| 37 |
return ret_val; |
| 38 |
} /* icnteq_ */ |
| 39 |
|