ItemByNumber (UnicodeNamedArraylist property): Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Created page with "<span style="font-size:120%; color:black"><b><section begin=dpl_desc/>Value of item selected by it<section end=dpl_desc/></b></span> [[Category:UnicodeNamedArraylist methods|Item...")
 
m (1 revision)
(No difference)

Revision as of 19:57, 5 January 2011

<section begin=dpl_desc/>Value of item selected by it<section end=dpl_desc/>

ItemByNumber is a member of the UnicodeNamedArraylist class.

This ReadWrite property returns or sets the UnicodeNamedArraylist item that has the specified item number. Item number is ordinal, so ItemByNumber(3), for example, identifies the third item in the ordered-by-name UnicodeNamedArraylist.

Syntax

  %item = %unamrayl:ItemByNumber(number)
  %unamrayl:ItemByNumber(number) = %item

Syntax Terms

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

Usage Notes

  • If the ItemByNumber property is being set and there is already an item on the UnicodeNamedArraylist that has the specified item number (position), that item is replaced. If the ItemByNumber property is being set and there is no item on the UnicodeNamedArraylist that has the indicated item number, the item is added. If the ItemByNumber property is being retrieved and there is no item on the UnicodeNamedArraylist that has the indicated item 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.
  • Item lets you retrieve or set an item using its item name.
  • For an example using the ItemByNumber method, see UnicodeNamedArraylist class.