ItemByNumber (GenericNamedArraylist property): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (It's not just a namedarraylist anymore Toto)
Line 27: Line 27:


==See also==
==See also==
<ul><li>The <var>Item</var> properties for <var>[[Item_(FloatNamedArraylist_property)|FloatNamedArraylist]]</var>, <var>[[Item (NamedArraylist property)|NamedArraylist]]</var>, and <var>[[Item_(UnicodeNamedArraylist_property)|UnicodeNamedArraylist]]</var> respectively, lets you retrieve or set an item using its item key.</ul>
<ul><li>The <var>Item</var> properties for <var>[[Item_(FloatNamedArraylist_property)|FloatNamedArraylist]]</var>, <var>[[Item (NamedArraylist property)|NamedArraylist]]</var>, and <var>[[Item_(UnicodeNamedArraylist_property)|UnicodeNamedArraylist]]</var> respectively, let you retrieve or set an item using its item key.</ul>
{{Template:GenericNamedArraylist:ItemByNumber footer}}
{{Template:GenericNamedArraylist:ItemByNumber footer}}

Revision as of 19:06, 21 July 2011

Return or set item using item number (FloatNamedArraylist, NamedArraylist, and UnicodeNamedArraylist classes)


ItemByNumber is a ReadWrite property returns or sets the FloatNamedArraylist, NamedArraylist, or UnicodeNamedArraylistitem that has the specified item number.

Syntax

%currentItem = anyNal:ItemByNumber( number) anyNal:ItemByNumber( number) = newItem

Syntax terms

%currentItem A variable of the same type as specified on the anyNal declaration to contain the value of the specified anyNal item.
anyNal A FloatNamedArraylist, NamedArraylist, or UnicodeNamedArraylist object.
number A whole number greater than 0 to identify a anyNal item by its position in the alphabetically ordered FloatNamedArraylist, NamedArraylist, or UnicodeNamedArraylist. If number is greater than the number of items in anyNal, or if it is less than or equal to zero, the request is cancelled.
newItem A variable or value of the same type as specified on the anyNal declaration to be assigned to the specified anyNal item.

Usage notes

  • If the ItemByNumber property is being set and there is already an item on the FloatNamedArraylist, NamedArraylist, or UnicodeNamedArraylist that has the specified number, that item is replaced. If the ItemByNumber property is being set and there is no item on the FloatNamedArraylist, NamedArraylist, or UnicodeNamedArraylist that has the indicated number, the item is added. If the ItemByNumber property is being retrieved and there is no item on the FloatNamedArraylist, NamedArraylist, or UnicodeNamedArraylist that has the indicated number, 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.

See also