DeepCopy (SortedRecordset function)

From m204wiki
Revision as of 23:32, 28 April 2011 by JAL2 (talk | contribs) (Created page with "<span class="pageSubtitle"><section begin=dpl_desc/><section end=dpl_desc/></span> Copy and DeepCopy functions <p> <var>Copy</var> and <var>D...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

<section begin=dpl_desc/><section end=dpl_desc/>

Copy and DeepCopy are members of the SortedRecordset class.


These functions make a copy of a SortedRecordset object. The DeepCopy function is identical to Copy, but flags the SortedRecordset class as "deep-copyable" (as these terms are described in "The Object class copy methods").

Syntax

%newSRecs = %sRecs:Copy %newSRecs = %sRecs:DeepCopy

Syntax terms

%newSRecs A SortedRecordset object created by this method that contains a copy of the method object.
%sRecs A SortedRecordset object variable. The variable can be null, in which case the output object will also be null.

Usage Notes

  • Since a SortedRecordset object can't be modified once it's created, there generally isn't a good reason to make a copy of a SortedRecordset object — it makes more sense to just assign the reference to the SortedRecordset object. The copy functionality for SortedRecordsets is mainly there to support DeepCopy of SortedRecordset objects to facilitate passing of these objects to and from daemons.
  • The following example illustrates the use of the Copy function:

    %sorted is object sortedRecordset in file geeks %sortedCopy is object sortedRecordset in file geeks ... %sortedCopy = %sorted:copy