Item (FloatNamedArraylist property): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (match syntax table to diagram, lots of tags, some edits)
Line 1: Line 1:
{{Template:FloatNamedArraylist:Item subtitle}}
{{Template:FloatNamedArraylist:Item subtitle}}


This ReadWrite property returns or sets the value of the item that has the
<var>Item</var> is a ReadWrite property returns or sets the value of the item that has the specified subscript number in the <var>FloatNamedArraylist</var>.
specified subscript number in the FloatNamedArraylist.
 
For additional comments about the Item method in collections, see [[Collections#Coding considerations for collections|"Coding considerations for collections"]].


For additional comments about the Item method in collections,
see [[Collections#Coding considerations for collections|Coding considerations for collections]].
==Syntax==
==Syntax==
{{Template:FloatNamedArraylist:Item syntax}}
{{Template:FloatNamedArraylist:Item syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%item</th>
<tr><th>%currentItem</th>
<td>A variable of the same type as specified on the ''%fnamrayl'' declaration to contain the value of the specified ''%fnamrayl'' item. Or a variable or value of the same type as specified on the ''%fnamrayl'' declaration to be assigned to the specified ''%fnamrayl'' item. </td></tr>
<td>A variable of the same type as specified on the <var class="term">fltNal</var> declaration to contain the value of the specified <var class="term">fltNal</var> item. Or a variable or value of the same type as specified on the <var class="term">fltNal</var> declaration to be assigned to the specified <var class="term">fltNal</var> item. </td></tr>
<tr><th>%fnamrayl</th>
<tr><th>fltNal</th>
<td>A FloatNamedArraylist object. </td></tr>
<td>A <var>FloatNamedArraylist</var> object. </td></tr>
<tr><th>subscript</th>
<tr><th>number</th>
<td>A number that serves as a subscript to identify a ''%fnamrayl'' item.</td></tr>
<td>A number that serves as a subscript to identify a <var class="term">fltNal</var> item.</td></tr>
</table>
</table>
==Usage notes==
==Usage notes==
<ul>
<ul>
<li>The <tt>Item</tt> keyword is not required.
<li>The <var>Item</var> keyword is not required. For example, in the request in the [[FloatNamedArraylist class]] example, <code>%y(7) = 'seven'</code>, for instance, is equivalent to:
For example, in the request in the
[[FloatNamedArraylist class]] example, <tt>%y(7) = 'seven'</tt>, for instance, is
equivalent to:
<p class="code">%y:item(7) = 'seven'
<p class="code">%y:item(7) = 'seven'
</p>
</p>
<li>If the Item property is being set and there is already an item
<li>If the <var>Item</var> property is being set and there is already an item on the <var>FloatNamedArraylist</var> that has the specified subscript, that item is replaced. If the <var>Item</var> property is being set and there is no item on the <var>FloatNamedArraylist</var> that has the indicated subscript, the item is added. If the <var>Item</var> property is being retrieved and there is no item on the <var>FloatNamedArraylist</var> that has the indicated subscript, the result is one of the following actions:
on the FloatNamedArraylist that has the specified subscript, that item is replaced.
 
If the Item property is being set and there is no item on the FloatNamedArraylist
that has the indicated subscript, the item is added.
 
If the Item property is being retrieved and there is no item on the FloatNamedArraylist
that has the indicated subscript, the result is one of the following actions:
<ul>
<ul>
<li>The request is cancelled if the UseDefault
<li>The request is cancelled if the <var>[[UseDefault (FloatNamedArraylist property)|UseDefault]]</var> property value is <code>False</code>.
[[UseDefault (FloatNamedArraylist property)|UseDefault]] property value is <tt>False</tt>.
<li>The <var>[[Default (FloatNamedArraylist property)|Default]]</var> value is returned if the <var>UseDefault</var> property is <code>True</code>.
<li>The [[Default (FloatNamedArraylist property)|Default]] value is returned if the
UseDefault property is <tt>True</tt>.
</ul>
</ul>
<li>As shown in the example in the [[FloatNamedArraylist class]] article,
<li>As shown in the example in the [[FloatNamedArraylist class]] article, <var>FloatNamedArraylist</var> items are ordered numerically by their subscript numbers. Accordingly, the <var>Item</var> method takes a numerical <i>subscript</i> argument.
FloatNamedArraylist items are ordered numerically by their subscript numbers.
Accordingly, the Item method takes a numerical ''subscript'' argument.
The ItemByNumber method, described below,
lets you retrieve or set an item using the item's ordinal number.
The [[NameByNumber (FloatNamedArraylist property)|NameByNumber]] property
lets you retrieve or set an item using the item's subscript number.
</ul>
</ul>
==See also==
==See also==
<ul><li>The <var>[[ItemByNumber_(GenericNamedArraylist_property)|ItemByNumber]]</var> method, lets you retrieve or set an item using the item's ordinal number.
<li>The <var>[[NameByNumber (FloatNamedArraylist property)|NameByNumber]]</var> property lets you retrieve the "name" (numerical subscript) of the item that has the specified item number (position) .
</ul>
{{Template:FloatNamedArraylist:Item footer}}
{{Template:FloatNamedArraylist:Item footer}}

Revision as of 08:56, 4 March 2011

Value of named item (FloatNamedArraylist class)


Item is a ReadWrite property returns or sets the value of the item that has the specified subscript number in the FloatNamedArraylist.

For additional comments about the Item method in collections, see "Coding considerations for collections".

Syntax

%currentItem = fltNal:Item( number) fltNal:Item( number) = newItem Throws ItemNotPresent

Syntax terms

%currentItem A variable of the same type as specified on the fltNal declaration to contain the value of the specified fltNal item. Or a variable or value of the same type as specified on the fltNal declaration to be assigned to the specified fltNal item.
fltNal A FloatNamedArraylist object.
number A number that serves as a subscript to identify a fltNal item.

Usage notes

  • The Item keyword is not required. For example, in the request in the FloatNamedArraylist class example, %y(7) = 'seven', for instance, is equivalent to:

    %y:item(7) = 'seven'

  • If the Item property is being set and there is already an item on the FloatNamedArraylist that has the specified subscript, that item is replaced. If the Item property is being set and there is no item on the FloatNamedArraylist that has the indicated subscript, the item is added. If the Item property is being retrieved and there is no item on the FloatNamedArraylist that has the indicated subscript, the result is one of the following actions:
    • The request is cancelled if the UseDefault property value is False.
    • The Default value is returned if the UseDefault property is True.
  • As shown in the example in the FloatNamedArraylist class article, FloatNamedArraylist items are ordered numerically by their subscript numbers. Accordingly, the Item method takes a numerical subscript argument.

See also

  • The ItemByNumber method, lets you retrieve or set an item using the item's ordinal number.
  • The NameByNumber property lets you retrieve the "name" (numerical subscript) of the item that has the specified item number (position) .