FirstItem (Stringlist function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (better code tags)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Template:Stringlist:FirstItem subtitle}}
{{Template:Stringlist:FirstItem subtitle}}


This method returns the current contents of the first item in the method object <var>Stringlist</var>. <var>FirstItem</var> is available in <var class=product>Sirius Mods</var> version 7.0 and later.
This method returns the current contents of the first item in the method object <var>Stringlist</var>.


==Syntax==
==Syntax==
Line 8: Line 8:
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%string</th>
<tr><th>%string</th>
<td>This longstring is to contain the contents of the first '''%sl''' item. </td></tr>
<td>This string is to receive the contents of the first <var class="term">sl</var> item. </td></tr>
<tr><th>sl</th>
<tr><th>sl</th>
<td>A <var>Stringlist</var> object.</td></tr>
<td>A <var>Stringlist</var> object.</td></tr>
Line 14: Line 14:


==Usage notes==
==Usage notes==
<ul>
<ul><li>All errors in <var>FirstItem</var> result in request cancellation.
<li>All errors in <var>FirstItem</var> result in request cancellation.<li>The <var>FirstItem</var> method for object %sl is equivalent to specifying <tt>.%sl:Item(1)</tt>. See the [[Item (Stringlist function)]] page.
<li>Calling <var>FirstItem</var> for object <code>%sl</code> is equivalent to specifying <code>%sl:</code><var>[[Item (Stringlist function)|Item]]</var><code>(1)</code>.
<li>The [[LastItem (Stringlist function)]] retrieves just the last item in a <var>Stringlist</var>.</ul>
<li><var>FirstItem</var> is available in <var class="product">Sirius Mods</var> version 7.0 and later.
</ul>


[[Category:Stringlist methods|FirstItem function]]
==See also==
<ul><li><var>[[Item (Stringlist function)|Item]]</var> which retrieves an arbitrary item in a <var>Stringlist</var>.
<li><var>[[LastItem (Stringlist function)|LastItem]]</var> which retrieves just the last item in a <var>Stringlist</var>.</ul>
{{Template:Stringlist:FirstItem footer}}

Latest revision as of 02:03, 27 January 2011

Retrieve value of first Stringlist item (Stringlist class)


This method returns the current contents of the first item in the method object Stringlist.

Syntax

%string = sl:FirstItem

Syntax terms

%string This string is to receive the contents of the first sl item.
sl A Stringlist object.

Usage notes

  • All errors in FirstItem result in request cancellation.
  • Calling FirstItem for object %sl is equivalent to specifying %sl:Item(1).
  • FirstItem is available in Sirius Mods version 7.0 and later.

See also

  • Item which retrieves an arbitrary item in a Stringlist.
  • LastItem which retrieves just the last item in a Stringlist.