FirstItem (GenericNamedArraylist property): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
m (typo fix)
 
(6 intermediate revisions by one other user not shown)
Line 3: Line 3:
==Syntax==
==Syntax==
{{Template:GenericNamedArraylist:FirstItem syntax}}
{{Template:GenericNamedArraylist:FirstItem syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%item</th>
<tr><th>%currentItem</th>
<td>A variable of the type of the item in the <var>FloatNamedArraylist</var>, <var>NamedArraylist</var>, or <var>UnicodeNamedArraylist</var> to contain the item that is located by the search.</td></tr>
<td>A variable of the same type as specified on the <var class="term">anyNal</var> declaration to contain the value of the specified <var class="term">anyNal</var> item.</td></tr>
 
<tr><th>anyNal</th>
<tr><th>anyNal</th>
<td>A <var>FloatNamedArraylist</var>, <var>NamedArraylist</var>, or <var>UnicodeNamedArraylist</var> object. </td></tr>
<td>A <var>FloatNamedArraylist</var>, <var>NamedArraylist</var>, or <var>UnicodeNamedArraylist</var> object. </td></tr>
<tr><th>newItem</th>
<td>A value of the same type as specified on the <var class="term">anyNal</var> declaration to be assigned to the specified <var class="term">anyNal</var> item. </td></tr>
</table>
</table>
==Usage notes==
==Usage notes==
==Examples==
<ul>
<li><var>FirstItem</var> is the same as the <var>[[ItemByNumber (GenericNamedArraylist property)|ItemByNumber]]</var> property with a <var class="term">number</var> argument of 1.
 
<li>The request is cancelled if the <var class="term">anyNal</var> collection is empty.
</ul>
 
 
==See also==
==See also==
The <var>[[LastItem (GenericNamedArraylist property)|LastItem]]</var> property is the last item in the collection.
{{Template:GenericNamedArraylist:FirstItem footer}}
{{Template:GenericNamedArraylist:FirstItem footer}}

Latest revision as of 15:03, 15 May 2014

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

[Introduced in Sirius Mods 8.1]


Syntax

%currentItem = anyNal:FirstItem anyNal:FirstItem = 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.
newItem A value of the same type as specified on the anyNal declaration to be assigned to the specified anyNal item.

Usage notes

  • FirstItem is the same as the ItemByNumber property with a number argument of 1.
  • The request is cancelled if the anyNal collection is empty.


See also

The LastItem property is the last item in the collection.