$ListCpy: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
m (misc cleanup)
 
(45 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:$ListCpy}}
{{DISPLAYTITLE:$ListCpy}}
<span class="pageSubtitle"><section begin="desc" />Copy $list<section end="desc" /></span>
<span class="pageSubtitle">Copy $list</span>


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


This function copies an entire $list, creating a new $list. The input $list can be created by any of the $list creating functions.  
<var>$ListCpy</var> copies an entire [[$lists|$list]], creating a new $list. The input $list can be created by any of the $list creating functions.  


The $ListCpy function accepts one argument and returns a numeric result.  
The <var>$ListCpy</var> function accepts one argument and returns a numeric result.  


The first argument is the identifier of the input $list. This is a required argument.
==Syntax==
==Syntax==
<p class="syntax"><section begin="syntax" /> %RESULT = $ListCpy(list_identifier)
<p class="syntax"><span class="term">%result</span> = <span class="literal">$ListCpy</span>(<span class="term">list_identifier</span>)
<section end="syntax" /></p>
<p class="caption">$ListCpy Function
</p>
</p>
<p class="caption">%RESULT is set to the identifier of the output $list.</p>


<p class="code">  
<p>
-3 - No room in CCATEMP
<var class="term">%result</var> is set to the identifier of the output $list.</p>
-5 - Required argument not specified
<p>
-6 - $List identifier invalid
The first argument is the identifier of the input $list. This is a required argument. </p>
</p>
 
<p class="caption">$ListCpy Error Codes
===Return codes===
<p class="code">-3 - No room in CCATEMP
-5 - Required argument not specified
-6 - $List identifier invalid
</p>
</p>


All invocations of a particular call to $ListCpy will always return the same $list identifier. Each time that call is executed, if the function is successful then any previous $list created by that call is deleted, and a new list is created.  
==Usage notes==
<ul>
<li>All invocations of a particular call to <var>$ListCpy</var> will always return the same $list identifier. Each time that call is executed, if the function is successful then any previous $list created by that call is deleted, and a new list is created. </li>


$LISTCPY's output $list identifier is associated with the same image as the input $list (as associated with $ListImg).  
<li><var>$ListCpy</var>'s output $list identifier is associated with the same image as the input $list (as associated with $ListImg). </li>


$ListCpy does a page for page copy of the input $list. As such, it is very efficient (more efficient than $List_Copy_Items) but it is also useless for compressing a list that has become sparse as the result of heavy $LISTINS, $LISTREP, $ListAdj and $ListRem activity. $ListRep and $ListAdj will only cause a $list to become sparse if $list items are replaced with larger $list items or increased in size. For list compression use $List_Copy_Items which is documented in :hdref refid=listcit..<p>
<li><var>$ListCpy</var> does a page for page copy of the input $list. As such, it is very efficient (more efficient than <var>$List_Copy_Items</var>) but it is also useless for compressing a list that has become sparse as the result of heavy <var>$ListIns</var>, <var>$ListRep</var>, <var>$ListAdj</var> and <var>$ListRem</var> activity. <var>$ListRep</var> and <var>$ListAdj</var> will only cause a $list to become sparse if $list items are replaced with larger $list items or increased in size. For list compression, use <var>[[$List_Copy_Items]]</var>. </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 $ListCpy
</p>


[[Category:$Functions|$ListCpy]]
[[Category:$Functions|$ListCpy]]

Latest revision as of 21:23, 6 June 2018

Copy $list

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

$ListCpy copies an entire $list, creating a new $list. The input $list can be created by any of the $list creating functions.

The $ListCpy function accepts one argument and returns a numeric result.

Syntax

%result = $ListCpy(list_identifier)

%result is set to the identifier of the output $list.

The first argument is the identifier of the input $list. This is a required argument.

Return codes

-3 - No room in CCATEMP -5 - Required argument not specified -6 - $List identifier invalid

Usage notes

  • All invocations of a particular call to $ListCpy will always return the same $list identifier. Each time that call is executed, if the function is successful then any previous $list created by that call is deleted, and a new list is created.
  • $ListCpy's output $list identifier is associated with the same image as the input $list (as associated with $ListImg).
  • $ListCpy does a page for page copy of the input $list. As such, it is very efficient (more efficient than $List_Copy_Items) but it is also useless for compressing a list that has become sparse as the result of heavy $ListIns, $ListRep, $ListAdj and $ListRem activity. $ListRep and $ListAdj will only cause a $list to become sparse if $list items are replaced with larger $list items or increased in size. For list compression, use $List_Copy_Items.

Products authorizing $ListCpy