Copy (Stringlist function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (camelCase)
Line 7: Line 7:
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%outlist</th>
<tr><th>%outList</th>
<td>A <var>Stringlist</var> to contain the copy of the method <var>Stringlist</var> <var class="term">sl</var></td></tr>
<td>A <var>Stringlist</var> to contain the copy of the method <var>Stringlist</var> <var class="term">sl</var></td></tr>
<tr><th>sl</th>
<tr><th>sl</th>

Revision as of 00:08, 27 January 2011

Copy Stringlist (Stringlist class)


This method copies an entire Stringlist, creating a new Stringlist. The Copy method accepts no arguments and returns a Stringlist object. If you are new to object-oriented programming or the Janus APIs you should read about Copying objects.

Syntax

%outList = sl:Copy

Syntax terms

%outList A Stringlist to contain the copy of the method Stringlist sl
sl A Stringlist object.

Usage notes

  • All errors in Copy result in request cancellation.
  • If the method Stringlist was associated with an image, by either BindImage or New, the output Stringlist is associated with the same image, as if a BindImage method had been transparently invoked on the result of the Copy.
  • Copy does a page-for-page copy of the input Stringlist. As such, it is very efficient (more efficient than CopyItems). However, it is unsuitable for compressing a Stringlist that has become sparse as the result of heavy Insert, Replace, ChangeItemLength or RemoveItem activity. Replace or ChangeItemLength may cause a Stringlist to become sparse only if Stringlist items are replaced with larger Stringlist items or increased in size.
  • For list compression, use CopyItems.

See also