Number (NamedArraylist function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
 
(9 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">
<table class="syntaxTable">
<tr><th><i>%num</i></th>
<tr><th>%number</th>
<td>A numeric variable to contain the number of the named ''%namrayl'' item. </td></tr>
<td>A numeric variable to contain the number of the named <var class="term">nal</var> item. </td></tr>
<tr><th><i>%namrayl</i></th>
<tr><th>nal</th>
<td>A NamedArraylist object. </td></tr>
<td>A <var>NamedArraylist</var> object. </td></tr>
<tr><th><i>name</i></th>
<tr><th>name</th>
<td>A string that serves as a subscript to identify a ''%namrayl'' item. If the indicated name is not in ''%namrayl'', <tt>0</tt> is returned, regardless of the setting of [[UseDefault (NamedArraylist property)|UseDefault]].</td></tr>
<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>
</table>
</table>
==Usage Notes==
 
==See also==
<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.