Default (GenericNamedArraylist 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 to be returned if named item not presen<section end=dpl_desc/></b></span> [[Category:NamedArraylist me...")
 
mNo edit summary
 
(14 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<span style="font-size:120%; color:black"><b><section begin=dpl_desc/>Value to be returned if named item not presen<section end=dpl_desc/></b></span>
{{Template:GenericNamedArraylist:Default subtitle}}
[[Category:NamedArraylist methods|Default property]]
 
<!--DPL?? Category:NamedArraylist methods|Default property: Value to be returned if named item not presen-->
<var>Default</var> is a <var>[[Classes and Objects#readWrite|ReadWrite]]</var> property that specifies the value to be returned if ''both'' of these conditions are satisfied:
<p>
<ul>
Default is a member of the [[NamedArraylist class]].
<li>A requested item name is not present in the method <var>[[FloatNamedArraylist class|FloatNamedArraylist]]</var>, <var>[[NamedArraylist class|NamedArraylist]]</var>, or <var>[[UnicodeNamedArraylist class|UnicodeNamedArraylist]]</var>.
</p>
<li>The <var>[[UseDefault (GenericNamedArraylist property)|UseDefault]]</var> property is set to <code>True</code>.
</ul>


This ReadWrite property indicates the value to be returned if a
requested item name is not in the NamedArraylist and
the [[UseDefault (NamedArraylist property)|UseDefault]] property is set
to <tt>True</tt>.
==Syntax==
==Syntax==
  %val = %namrayl:Default
{{Template:GenericNamedArraylist:Default syntax}}


  %namrayl:Default = %val
===Syntax terms===
===Syntax Terms===
<table class="syntaxTable">
<dl>
<tr><th>%currentItem</th>
<dt><i>%val</i>
<td>A variable of the <var class="term">anyNal</var> item type, or one that can be converted to from that type; it will receive the current default. </td></tr>
<dd>A value that matches the NamedArraylist
<tr><th>anyNal</th>
item type or one that can be converted to that type.
<td>A <var>FloatNamedArraylist</var>, <var>NamedArraylist</var>, or <var>UnicodeNamedArraylist</var> object.</td></tr>
<dt><i>%namrayl</i>
<tr><th>newItem</th>
<dd>A NamedArraylist object.
<td>A new value that matches the <var class="term">anyNal</var> item type, or one that can be converted to that type; that will become the new default.</td></tr>
</table>


</dl>
==Usage notes==
==Usage Notes==
<ul><li>The initial value of the Default property varies with the array list item type:
<ul>
<li>The initial value of the Default property varies with the
NamedArraylist item type:
<table>
<table>
<tr><th>Value</th><th>Item type</th></tr>
<tr><th>Item type</th><th>Value</th></tr>
<tr><td>0</td><td>>Float and Fixed</td></tr>
<tr><td>Float and Fixed</td><td>0</td></tr>
<tr><td>null string</td><td>>String, Longstring, and Unicode</td></tr>
<tr><td>String, Longstring, and Unicode</td><td>null string</td></tr>
<tr><td>null reference</td><td>>object</td></tr>
<tr><td>Object</td><td>null reference</td></tr>
</table>
</table></ul>
</ul>
 
==See also==
{{Template:GenericNamedArraylist:Default footer}}

Latest revision as of 19:39, 1 November 2012

Value for Item to return when Name has no value (FloatNamedArraylist, NamedArraylist, and UnicodeNamedArraylist classes)


Default is a ReadWrite property that specifies the value to be returned if both of these conditions are satisfied:

Syntax

%currentItem = anyNal:Default anyNal:Default = newItem

Syntax terms

%currentItem A variable of the anyNal item type, or one that can be converted to from that type; it will receive the current default.
anyNal A FloatNamedArraylist, NamedArraylist, or UnicodeNamedArraylist object.
newItem A new value that matches the anyNal item type, or one that can be converted to that type; that will become the new default.

Usage notes

  • The initial value of the Default property varies with the array list item type:
    Item typeValue
    Float and Fixed0
    String, Longstring, and Unicodenull string
    Objectnull reference

See also