NamedArraylist methods syntax: Difference between revisions
m (Automatically generated page update) |
m (Automatically generated page update) |
||
Line 29: | Line 29: | ||
<span class="squareb">[</span><span class="literal" title="Number">Start=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="Number">MaxItems=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="String">Label=</span> <span class="term" title="String">string</span><span class="squareb">]</span><span class="comma">,</span> - | <span class="squareb">[</span><span class="literal" title="Number">Start=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="Number">MaxItems=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="String">Label=</span> <span class="term" title="String">string</span><span class="squareb">]</span><span class="comma">,</span> - | ||
<span class="squareb">[</span><span class="literal" title="Number">NameWidth=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="literal">)</span></p> | <span class="squareb">[</span><span class="literal" title="Number">NameWidth=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="literal">)</span></p> | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="squareb">[</span><span class="term">% | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="squareb">[</span><span class="term">%count</span><span class="literal"> =</span><span class="squareb">]</span> <span class="term">nal</span><span class="literal">:[[RemoveItem (NamedArraylist function)|RemoveItem]]</span><span class="literal">(</span> <span class="term" title="String">string</span><span class="literal">)</span></p> | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%al</span><span class="literal"> =</span> <span class="term">anyNal</span><span class="literal">:[[SortNew (GenericNamedArraylist function)|SortNew]]</span><span class="literal">(</span> <span class="term" title="SortOrder">sortOrder</span><span class="literal">)</span></p> | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%al</span><span class="literal"> =</span> <span class="term">anyNal</span><span class="literal">:[[SortNew (GenericNamedArraylist function)|SortNew]]</span><span class="literal">(</span> <span class="term" title="SortOrder">sortOrder</span><span class="literal">)</span></p> | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%number</span><span class="literal"> =</span> <span class="term">anyNal</span><span class="literal">:[[StandardDeviation (GenericNamedArraylist function)|StandardDeviation]]</span><span class="literal">(</span> <span class="term" title="ItemFunction">itemFunction</span><span class="literal">)</span></p> | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%number</span><span class="literal"> =</span> <span class="term">anyNal</span><span class="literal">:[[StandardDeviation (GenericNamedArraylist function)|StandardDeviation]]</span><span class="literal">(</span> <span class="term" title="ItemFunction">itemFunction</span><span class="literal">)</span></p> |
Revision as of 13:17, 14 March 2011
The syntax for each of the NamedArraylist class methods is shown below.
Square brackets indicate optional elements of the method invocation. See also the notation conventions for methods and the List of NamedArraylist methods.
anyNal:Audit( itemFunction, [NumWidth= number], [Separator= string], - [Start= number], [MaxItems= number], [Label= string], - [NameWidth= number])
%number = anyNal:Average( itemFunction)
%outNal = nal:Copy
%number = anyNal:Count
%number = anyNal:CountSubset( selectionCriterion)
%outNal = nal:DeepCopy
%currentItem = anyNal:Default anyNal:Default = newItem
%item = anyNal:FindNextItem( selectionCriterion, [Start= number])
%number = anyNal:FindNextItemNumber( selectionCriterion, [Start= number])
%item = anyNal:FindPreviousItem( selectionCriterion, [Start= number])
%number = anyNal:FindPreviousItemNumber( selectionCriterion, [Start= number])
%currentItem = nal:Item( string) nal:Item( string) = newItem
%currentItem = anyNal:ItemByNumber( number) anyNal:ItemByNumber( number) = newItem
%string = nal:Maximum( itemFunction)
%item = anyNal:MaximumItem( itemFunction)
%string = nal:Minimum( itemFunction)
%item = anyNal:MinimumItem( itemFunction)
%name = nal:NameByNumber( number)
%number = nal:Number( name)
anyNal:Print( itemFunction, [NumWidth= number], [Separator= string], - [Start= number], [MaxItems= number], [Label= string], - [NameWidth= number])
[%count =] nal:RemoveItem( string)
%al = anyNal:SortNew( sortOrder)
%number = anyNal:StandardDeviation( itemFunction)
%outNal = nal:SubsetNew( selectionCriterion)
%number = anyNal:Sum( itemFunction)
anyNal:Trace( itemFunction, [NumWidth= number], [Separator= string], - [Start= number], [MaxItems= number], [Label= string], - [NameWidth= number])
%currentBoolean = anyNal:UseDefault anyNal:UseDefault = newBoolean
%number = anyNal:Variance( itemFunction)