NameByNumber (NamedArraylist function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
Line 11: Line 11:
<p class="code">%name = %namrayl:NameByNumber(number)
<p class="code">%name = %namrayl:NameByNumber(number)
</p>
</p>
===Syntax Terms===
===Syntax terms===
<dl>
<table class="syntaxTable">
<dt><i>%name</i>
<tr><th><i>%name</i></th>
<dd>A string variable to contain the name of the ''namrayl'' item
<td>A string variable to contain the name of the ''namrayl'' item that is specified by ''number''. </td></tr>
that is specified by ''number''.
<tr><th><i>%namrayl</i></th>
<dt><i>%namrayl</i>
<td>A NamedArraylist object. </td></tr>
<dd>A NamedArraylist object.
<tr><th><i>number</i></th>
<dt><i>number</i>
<td>A whole number greater than 0 to identify a ''%namrayl'' item by its position (item number) in the alphabetically ordered NamedArraylist. If ''number'' is greater than the number of items in ''%namrayl'', or if it is less than or equal to zero, the request is cancelled.</td></tr>
<dd>A whole number greater than 0 to identify a ''%namrayl'' item
</table>
by its position (item number) in the alphabetically ordered NamedArraylist.
If ''number'' is greater than the number of items in ''%namrayl'',
or if it is less than or equal to zero, the request is cancelled.
 
</dl>
==Usage Notes==
==Usage Notes==
<ul>
<ul>

Revision as of 23:08, 31 January 2011

<section begin=dpl_desc/>Name of specified item<section end=dpl_desc/>

NameByNumber is a member of the NamedArraylist class.

This ReadOnly property returns the name of the item that has the indicated item number in the NamedArraylist.

Syntax

%name = %namrayl:NameByNumber(number)

Syntax terms

%name A string variable to contain the name of the namrayl item that is specified by number.
%namrayl A NamedArraylist object.
number A whole number greater than 0 to identify a %namrayl item by its position (item number) in the alphabetically ordered NamedArraylist. If number is greater than the number of items in %namrayl, or if it is less than or equal to zero, the request is cancelled.

Usage Notes

  • If the NameByNumber property is being retrieved and there is no item on the NamedArraylist that has the indicated item number, the result is one of the following actions:
    • The request is cancelled if the UseDefault property is False.
    • The [Default (NamedArraylist property)|Default]] value is returned if the UseDefault property is True.
  • The Number property lets you retrieve an item using its item number.