$ListInfI: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
(Automatically generated page update)
Line 54: Line 54:
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Media:JoclrNew.pdf|Janus Open Client]]</li>
<li>[[Media:JoclrNew.pdf|Janus Open Client]]</li>
<li>[[Media:JosrvrNew.pdf|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>

Revision as of 22:38, 19 February 2015

Retrieve $list item into image

Note: Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $ListInfI function is GetImage.

This function copies data from a specified $list item to an image.

The $ListInfI function accepts three arguments and returns a numeric result. It is a callable $function.

The first argument is a $list identifier. This is a required argument.

The second argument is the number of the item in the $list. This is a required argument.

The third argument can either be a string containing the name of an image or any image item from the required image. This is an optional argument if a image has been associated with the $list with a $ListImg function. Otherwise, it is a required argument.

Syntax

[%RESULT =] $ListInfI(list_identifier, item_num, image_id)

%result is a number that indicates whether or not an error has occurred.

Error codes

0 - Data successfully copied -5 - Required argument not specified -6 - $List identifier invalid -7 - Item number not found in $list -8 - Image not found or not active

Usage notes

  • One way to extract a $list item into an image called 'HEADSTONE' is as follows :

    %RC = $ListInfI(%LIST, %N, 'HEADSTONE')

    This is a more efficient way:

    %RC = $ListInfI(%LIST, %N, %HEADSTONE:ID)

    The specific image item is irrelevant (as long as it is valid) in this call, but is more efficient than specifying the image name in quotes: In the first example, the image name must be hashed and looked up (in NTBL) in each invocation of $ListInfI, while in the second example, the hashing of the image name and lookup happens only once, and that is at compile time.

    Here is an even neater and equally efficient way of coding this:

    %RC = $ListImg(%LIST, %HEADSTONE:FNAME) . . . %RC = $ListInfI(%LIST, %N)

    In this last example, $ListImg associates the image with the $list, eliminating the need to specify the image name on the $ListInfI. This association is also useful in many other function calls in that it provides a structure to be associated with the $list that is useful for column oriented functions such as $ListFindI and $ListSrt.

Products authorizing $ListInfI