$ListNew: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Created page with "{{DISPLAYTITLE:$ListNew}} <span class="pageSubtitle"><section begin="desc" />Create empty $list<section end="desc" /></span> <p class="warning">Most Sirius $functions have been ...")
 
m (misc cleanup)
 
(64 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:$ListNew}}
{{DISPLAYTITLE:$ListNew}}
<span class="pageSubtitle"><section begin="desc" />Create empty $list<section end="desc" /></span>
<span class="pageSubtitle">Create empty $list</span>


<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $ListNew function is [[to be entered]].</p>
<p class="warn"><b>Note:</b> Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the <var>$ListNew</var> function is the <var>[[New (Stringlist constructor)|New]]</var> constructor.</p>


This function creates an empty $list.  
The <var>$ListNew</var> function creates an empty $list. It
accepts one argument and returns a numeric result.  


The $ListNew function accepts one argument and returns a numeric result.
The first argument, if set to the string &OSQ.NOREL&CSQ., indicates that the contents of the $list are not to be emptied when a RELEASE ALL RECORDS statement is executed. This is an optional argument.
==Syntax==
==Syntax==
<p class="syntax"><section begin="syntax" /> %RESULT = $ListNew(option)
<p class="syntax"><span class="term">%result</span> = <span class="literal">$ListNew</span>([<span class="term">option</span>])
<section end="syntax" /></p>
<p class="caption">$ListNew Function
</p>
</p>
<p class="caption">%RESULT is set to the identifier of the created empty $list.</p>
There are no error codes associated with $ListNew.


All invocations of a particular call to $ListNew will always return the same value. Each time that call is executed, any previous $list created by that call is deleted, and a new list is created.<p>
<table>
<tr><th>%result</th>
<td>A numeric variable that is set to the identifier of the created empty $list.
<p>
No error codes are associated with <var>$ListNew</var>. </p></td></tr>
 
<tr><th>option</th>
<td>The string <code>NOREL</code> indicates that the contents of the $list are not to be emptied if a <var>Release All Records</var> statement is executed. </td></tr>
</table>
 
==Usage notes==
<ul>
<li>All invocations of a particular call to <var>$ListNew</var> will always return the same value. Each time that call is executed, any previous $list created by that call is deleted, and a new list is created. </li>
 
<li><var>$ListNew</var> is not allowed in the <var>Initial</var> clause of a [[Using variables and values in computation#Declare statements for %variables|declaration statement]]. </li>
</ul>


==Products authorizing {{PAGENAMEE}}==
<ul class="smallAndTightList">
<ul class="smallAndTightList">
<li>[[Sirius functions]]</li>
<li>[[Sirius Functions]]</li>
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Janus Open Client]]</li>
<li>[[Media:JoclrNew.pdf|Janus Open Client]]</li>
<li>[[Janus Open Server]]</li>
<li>[[Media:JosrvrNew.pdf|Janus Open Server]]</li>
<li>[[Janus Sockets]]</li>
<li>[[Janus Sockets]]</li>
<li>[[Janus Web Server]]</li>
<li>[[Janus Web Server]]</li>
<li>[[Japanese functions]]</li>
<li>Japanese functions</li>
<li>[[Sir2000 Field Migration Facility]]</li>
<li>[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]</li>
 
</ul>
</ul>
   
   
</p>
<p class="caption">Products authorizing $ListNew
</p>
[[Category:$Functions|$ListNew]]
[[Category:$Functions|$ListNew]]

Latest revision as of 21:21, 15 February 2018

Create empty $list

Note: Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $ListNew function is the New constructor.

The $ListNew function creates an empty $list. It accepts one argument and returns a numeric result.

Syntax

%result = $ListNew([option])

%result A numeric variable that is set to the identifier of the created empty $list.

No error codes are associated with $ListNew.

option The string NOREL indicates that the contents of the $list are not to be emptied if a Release All Records statement is executed.

Usage notes

  • All invocations of a particular call to $ListNew will always return the same value. Each time that call is executed, any previous $list created by that call is deleted, and a new list is created.
  • $ListNew is not allowed in the Initial clause of a declaration statement.

Products authorizing $ListNew