Number (NamedArraylist function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<span style="font-size:120%; color:black"><b><section begin=dpl_desc/>Item number of named item<section end=dpl_desc/></b></span>
{{Template:NamedArraylist:Number subtitle}}
[[Category:NamedArraylist methods|Number property]]
 
<!--DPL?? Category:NamedArraylist methods|Number property: Item number of named item-->
<var>Number</var> returns the item number (ordinal) of the item that has the specified name in the <var>NamedArraylist</var>.
<p>
Number is a member of the [[NamedArraylist class]].
</p>


This ReadOnly property returns the item number (ordinal) of the item that has the
specified name in the NamedArraylist.
==Syntax==
==Syntax==
<p class="code">%num = %namrayl:Number(name)
{{Template:NamedArraylist:Number syntax}}
</p>
===Syntax terms===
===Syntax Terms===
<table class="syntaxTable">
<dl>
<tr><th>%number</th>
<dt><i>%num</i>
<td>A numeric variable to contain the number of the named <var class="term">nal</var> item. </td></tr>
<dd>A numeric variable to contain the number of the named ''%namrayl'' item.
<tr><th>nal</th>
<dt><i>%namrayl</i>
<td>A <var>NamedArraylist</var> object. </td></tr>
<dd>A NamedArraylist object.
<tr><th>name</th>
<dt><i>name</i>
<td>A string that serves as a subscript to identify a <var class="term">nal</var> item. If the indicated name is not in <var class="term">nal</var>, <var class="output">0</var> is returned, regardless of the setting of <var>[[UseDefault (NamedArraylist property)|UseDefault]]</var>.</td></tr>
<dd>A string that serves as a subscript to identify a ''%namrayl'' item.
</table>
If the indicated name is not in ''%namrayl'', <tt>0</tt> is returned,
regardless of the setting of [[UseDefault (NamedArraylist property)|UseDefault]].


</dl>
==See also==
==Usage Notes==
<ul>
<ul>
<li>If the Number property is called and there is no item
<li>The <var>[[ItemByNumber_(GenericNamedArraylist_property)|ItemByNumber]]</var> property lets you retrieve or set an item using the item's ordinal number.
on the NamedArraylist that has the indicated subscript name,
<li>The <var>[[NameByNumber (NamedArraylist function)|NameByNumber]]</var> function lets you retrieve an item's name using the item's ordinal number.
a <tt>0</tt> is returned,
regardless of the setting of [[UseDefault (FloatNamedArraylist property)|UseDefault]].
</ul>
</ul>
{{Template:NamedArraylist:Number footer}}

Latest revision as of 22:14, 7 August 2012

Item number of specified name (NamedArraylist class)


Number returns the item number (ordinal) of the item that has the specified name in the NamedArraylist.

Syntax

%number = nal:Number( name)

Syntax terms

%number A numeric variable to contain the number of the named nal item.
nal A NamedArraylist object.
name A string that serves as a subscript to identify a nal item. If the indicated name is not in nal, 0 is returned, regardless of the setting of UseDefault.

See also

  • The ItemByNumber property lets you retrieve or set an item using the item's ordinal number.
  • The NameByNumber function lets you retrieve an item's name using the item's ordinal number.