$ListNewI: Difference between revisions
m (1 revision) |
mNo edit summary |
||
Line 2: | Line 2: | ||
<span class="pageSubtitle"><section begin="desc" />Create empty $list associated with image<section end="desc" /></span> | <span class="pageSubtitle"><section begin="desc" />Create empty $list associated with image<section end="desc" /></span> | ||
<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $ListNewI function is [[ | <p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $ListNewI function is the [[New (Stringlist constructor)]].</p> | ||
This function creates an empty $list. The created $list is associated with an image exactly as if the $ListNew call was followed by a $ListImg call | This function creates an empty $list. The created $list is associated with an image exactly as if the [[$ListNew]] call was followed by a [[$ListImg]] call. | ||
The $ListNewI function accepts two arguments and returns a numeric result. | The $ListNewI function accepts two arguments and returns a numeric result. | ||
Line 10: | Line 10: | ||
The first argument can either be a string containing the name of an image or any image item from the required image. This is a required argument. | The first argument can either be a string containing the name of an image or any image item from the required image. This is a required argument. | ||
The second argument, if set to the string | The second argument, if set to the string <tt>NOREL</tt>, 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 = $ListNewI(image_id, option) | <p class="syntax"><section begin="syntax" /> %RESULT = $ListNewI(image_id, option) |
Revision as of 15:46, 10 February 2011
<section begin="desc" />Create empty $list associated with image<section end="desc" />
Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $ListNewI function is the New (Stringlist constructor).
This function creates an empty $list. The created $list is associated with an image exactly as if the $ListNew call was followed by a $ListImg call.
The $ListNewI function accepts two arguments and returns a numeric result.
The first argument can either be a string containing the name of an image or any image item from the required image. This is a required argument.
The second argument, if set to the string NOREL, 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
<section begin="syntax" /> %RESULT = $ListNewI(image_id, option) <section end="syntax" />
There are no error codes associated with $ListNewI though the absence of the image identifier or an invalid image identifier will cause request cancellation.
All invocations of a particular call to $ListNewI 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.
$ListNewI is available in Version 6.2 and later of the Sirius Mods.