$ImgInf: Difference between revisions
(Created page with "{{DISPLAYTITLE:$ImgInf}} <span class="pageSubtitle"><section begin="desc" />Retrieve image item by variable name<section end="desc" /></span> <p class="warning">Most Sirius $fun...") |
(Automatically generated page update) |
||
(44 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:$ImgInf}} | {{DISPLAYTITLE:$ImgInf}} | ||
<span class="pageSubtitle" | <span class="pageSubtitle">Retrieve image item by variable name</span> | ||
<p class=" | <p class="warn"><b>Note: </b>Many $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $ImgInf function.</p> | ||
This function returns a string containing the current value of a specified image item. All errors cause request cancellation. | This function returns a string containing the current value of a specified image item. All errors cause request cancellation. | ||
Line 8: | Line 8: | ||
The $ImgInf function accepts two arguments and returns a string result. | The $ImgInf function accepts two arguments and returns a string result. | ||
The first argument is either a string that contains an image name or any image item in the source image. If an image item is specified, only the image portion is relevant for this function since the second argument indicates the actual item from which data is to be extracted. Nevertheless, it is more efficient to specify an image item rather than an image name unless the image name itself is to be variable at run time. This is because an image name must be hashed and then NTBL must be searched for the hash value, both moderately expensive operations. | The first argument is either a string that contains an image name or any image item in the source image. If an image item is specified, only the image portion is relevant for this function since the second argument indicates the actual item from which data is to be extracted. Nevertheless, it is more efficient to specify an image item rather than an image name unless the image name itself is to be variable at run time. This is because an image name must be hashed and then NTBL must be searched for the hash value, both moderately expensive operations. | ||
The second argument is a string that contains the name of the image item from which the value is to be retrieved. | |||
==Syntax== | ==Syntax== | ||
<p class="syntax">< | <p class="syntax"><span class="term">%result</span> = <span class="literal">$ImgInf</span>(<span class="term">image_identifier</span>, <span class="term">item_name</span>) | ||
< | |||
< | |||
</p> | </p> | ||
<p> | |||
<var class="term">%result</var> is a string that contains the value of the image item specified by item_name in the image specified by image_identifier.</p> | |||
$ImgInf is provided to get around the fact that | ==Usage notes== | ||
<var>$ImgInf</var> is provided to get around the fact that <var class="product">Model 204</var> has no support for image name variables in the way it has support for screen name variables. That is, if the image or image item from which data is to be extracted is unknown at compile time, $ImgInf can be used to retrieve the image data based on values set at evaluation time. | |||
<p class="code"> % | |||
==Example== | |||
<p class="code">%name = $ImgInf(%rectype, 'NAME') | |||
</p> | </p> | ||
extracts the value of an image item called "NAME" from the image associated with the variable %RECTYPE. | extracts the value of an image item called "NAME" from the image associated with the variable %RECTYPE. | ||
<p class="code"> % | |||
<p class="code">%data = $ImgInf(%BIGIMG:ID, %field) | |||
</p> | </p> | ||
extracts the value of an image item whose name is indicated by %FIELD from the image BIGIMG. | extracts the value of an image item whose name is indicated by %FIELD from the image BIGIMG. | ||
Obviously, if both image and item name are | Obviously, if both image and item name are known at evaluation time a simple assignment should be performed as in | ||
<p class="code"> % | |||
<p class="code">%data = %bigimg:CUSTID | |||
</p> | </p> | ||
==Products authorizing {{PAGENAMEE}}== | |||
<ul class="smallAndTightList"> | <ul class="smallAndTightList"> | ||
<li>[[Sirius functions]]</li> | <li>[[List of $functions|Sirius functions]]</li> | ||
<li>[[Fast/Unload User Language Interface]]</li> | <li>[[Fast/Unload User Language Interface]]</li> | ||
<li>[[Janus Open Client]]</li> | <li>[[Media:JoclrNew.pdf|Janus Open Client]]</li> | ||
<li>[[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> | ||
<li> | <li>Japanese functions</li> | ||
<li>[[Sir2000 Field Migration Facility]]</li> | <li>[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]</li> | ||
</ul> | </ul> | ||
</p> | <p>.</p> | ||
[[Category:$Functions|$ImgInf]] | [[Category:$Functions|$ImgInf]] |
Latest revision as of 22:51, 20 September 2018
Retrieve image item by variable name
Note: Many $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $ImgInf function.
This function returns a string containing the current value of a specified image item. All errors cause request cancellation.
The $ImgInf function accepts two arguments and returns a string result.
The first argument is either a string that contains an image name or any image item in the source image. If an image item is specified, only the image portion is relevant for this function since the second argument indicates the actual item from which data is to be extracted. Nevertheless, it is more efficient to specify an image item rather than an image name unless the image name itself is to be variable at run time. This is because an image name must be hashed and then NTBL must be searched for the hash value, both moderately expensive operations.
The second argument is a string that contains the name of the image item from which the value is to be retrieved.
Syntax
%result = $ImgInf(image_identifier, item_name)
%result is a string that contains the value of the image item specified by item_name in the image specified by image_identifier.
Usage notes
$ImgInf is provided to get around the fact that Model 204 has no support for image name variables in the way it has support for screen name variables. That is, if the image or image item from which data is to be extracted is unknown at compile time, $ImgInf can be used to retrieve the image data based on values set at evaluation time.
Example
%name = $ImgInf(%rectype, 'NAME')
extracts the value of an image item called "NAME" from the image associated with the variable %RECTYPE.
%data = $ImgInf(%BIGIMG:ID, %field)
extracts the value of an image item whose name is indicated by %FIELD from the image BIGIMG.
Obviously, if both image and item name are known at evaluation time a simple assignment should be performed as in
%data = %bigimg:CUSTID
Products authorizing $ImgInf
- Sirius functions
- Fast/Unload User Language Interface
- Janus Open Client
- Janus Open Server
- Janus Sockets
- Janus Web Server
- Japanese functions
- Sir2000 Field Migration Facility
.