CountSubset (GenericNamedArraylist function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (Automatically generated page update)
 
mNo edit summary
Line 1: Line 1:
{{Template:GenericNamedArraylist:CountSubset subtitle}}
{{Template:GenericNamedArraylist:CountSubset subtitle}}


This page is [[under construction]].
The <var>CountSubset</var> function returns the number of items in a collection that match a
specified selection criterion. It is related to the <var>[[SubsetNew (GenericNamedArraylist function)|SubsetNew]]</var> collection method, which returns not the count but a collection of the matching items for a specified criterion.
 
==Syntax==
==Syntax==
{{Template:GenericNamedArraylist:CountSubset syntax}}
{{Template:GenericNamedArraylist:CountSubset syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%number</th><td>number</td></tr>
<tr><th>%number</th>
<td>A numeric variable to contain the count of matching items.</td></tr>
 
<tr><th>anyNal</th>
<tr><th>anyNal</th>
<td>GenericNamedArraylist object</td></tr>
<td>A <var>[[NamedArraylist class|NamedArraylist]]</var>, <var>[[FloatNamedArraylist class|FloatNamedArraylist]]</var>, or <var>[[UnicodeNamedArraylist class|UnicodeNamedArraylist]]</var> object variable.</td></tr>
 
<tr><th>selectionCriterion</th>
<tr><th>selectionCriterion</th>
<td><var>SelectionCriterion</var> object</td></tr>
<td>A <var>[[SelectionCriterion class|SelectionCriterion]]</var> object, which is a relational expression that is applied to each collection item value to determine whether the value satisfies the expression. This is a required parameter.</td></tr>
</table>
</table>
==Usage notes==
==Usage notes==
==Examples==
==Examples==
==See also==
==See also==
{{Template:GenericNamedArraylist:CountSubset footer}}
{{Template:GenericNamedArraylist:CountSubset footer}}

Revision as of 20:13, 17 July 2012

Number of items that match some selection criteria (FloatNamedArraylist, NamedArraylist, and UnicodeNamedArraylist classes)

[Introduced in Sirius Mods 7.8]


The CountSubset function returns the number of items in a collection that match a specified selection criterion. It is related to the SubsetNew collection method, which returns not the count but a collection of the matching items for a specified criterion.

Syntax

%number = anyNal:CountSubset( selectionCriterion)

Syntax terms

%number A numeric variable to contain the count of matching items.
anyNal A NamedArraylist, FloatNamedArraylist, or UnicodeNamedArraylist object variable.
selectionCriterion A SelectionCriterion object, which is a relational expression that is applied to each collection item value to determine whether the value satisfies the expression. This is a required parameter.

Usage notes

Examples

See also