$ListImg: Difference between revisions
(Created page with "{{DISPLAYTITLE:$ListImg}} <span class="pageSubtitle"><section begin="desc" />Associate an image with a $list<section end="desc" /></span> <p class="warning">Most Sirius $functio...") |
m (1 revision) |
(No difference)
|
Revision as of 22:28, 8 February 2011
<section begin="desc" />Associate an image with a $list<section end="desc" />
Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $ListImg function is to be entered.
This function returns a 0 indicating that the image has been associated with the $list or a negative number indicating that an error has occured.
The $ListImg function accepts two arguments and returns a numeric result. It is a callable $function (:hdref refid=callfun.).
The first argument is a $list identifier. This is a required argument.
The second argument can be a string containing the name of an image, or it can be any image item from the required image. This is a required argument.
Syntax
<section begin="syntax" /> [%RESULT =] $ListImg(list_identifier, image_id) <section end="syntax" />
-5 - Required argument not specified -6 - $List identifier invalid -8 - Image not found
Suppose there is an image with the following description:
IMAGE SALES ITEM IS STRING LEN 16 ID IS STRING LEN 8 PRICE IS BINARY LEN 4 END IMAGE
One can associate this image with the $list %LIST with
%RC = $ListImg(%LIST, 'SALES')
or
%RC = $ListImg(%LIST, %SALES:ID)
While the latter is syntactically inefficient (:ID is superfluous), it is more efficient because the image name hashing and lookup is done at compile time rather than evaluation time.
$ListAddI | :hdref refid=listadi. |
---|---|
$ListInf | :hdref refid=listinf. |
$ListInfI | :hdref refid=listifi. |
$ListInsI | :hdref refid=listisi. |
$ListLoc | :hdref refid=listloc. |
$ListLup | :hdref refid=listlup. |
$ListOvl | :hdref refid=listovl. |
$ListRepI | :hdref refid=listrpi. |
$ListSrt | :hdref refid=listsrt. |
$ListSub | :hdref refid=listsub. |