Copy (SortedRecordset function): Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m (→Usage notes) |
||
(One intermediate revision by one other user not shown) | |||
Line 18: | Line 18: | ||
<li>Since a <var>SortedRecordset</var> object can't be modified once it's created, | <li>Since a <var>SortedRecordset</var> object can't be modified once it's created, | ||
there generally isn't a good reason to make a copy of a <var>SortedRecordset</var> | there generally isn't a good reason to make a copy of a <var>SortedRecordset</var> | ||
object & | object — it makes more sense to just assign the reference to the | ||
<var>SortedRecordset</var> object. | <var>SortedRecordset</var> object. | ||
The copy functionality for <var>SortedRecordsets</var> is mainly there to support <var>DeepCopy</var> | The copy functionality for <var>SortedRecordsets</var> is mainly there to support <var>DeepCopy</var> | ||
Line 24: | Line 24: | ||
from [[Daemon class|daemons]]. | from [[Daemon class|daemons]]. | ||
<li>The following example illustrates the use of the <var>Copy</var> function: | <li>The following example illustrates the use of the <var>Copy</var> function: | ||
<p class="code"> %sorted is object sortedRecordset in file geeks | <p class="code">%sorted is object sortedRecordset in file geeks | ||
%sortedCopy is object sortedRecordset in file geeks | |||
... | |||
%sortedCopy = %sorted:copy | |||
</p> | </p> | ||
</ul> | </ul> | ||
==See also== | ==See also== | ||
{{Template:SortedRecordset:Copy footer}} | {{Template:SortedRecordset:Copy footer}} |
Latest revision as of 21:34, 9 November 2012
Copy this SortedRecordset object (SortedRecordset class)
This function makes a copy of a SortedRecordset object.
The DeepCopy function is identical to Copy, but it flags the SortedRecordset class as "deep-copyable" (as these terms are described in
"The Object class copy methods").
Syntax
%outSortedRecordset = sortedRecordset:Copy
Syntax terms
%outSortedRecordset | A SortedRecordset object created by this method that contains a copy of the method object. |
---|---|
sortedRecordset | 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